forked from influxdata/influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(http): pretty stack trace for the http panic recovery handler (i…
…nfluxdata#13509) When printing out a stacktrace with a logged error message, it is better to set the `Stack` property on the entry than to include it as a string within the context fields. It is also better than using `zap.Stack()` too. This is because certain encoders will perform a pretty print of the stacktrace. The default zap-logfmt will read this property and include it as a field so this code is identical when using that encoder, but the console encoder, which is commonly used in local development because it is automatically used with a TTY available, will print out a newline and pretty print the stacktrace if it is included on the entry itself.
- Loading branch information
1 parent
707cfc1
commit 38d9fb8
Showing
2 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters