Skip to content

Conversation

@elindsey
Copy link

There are some use cases for writing to zerolog from within the ErrorHandler, but today this is extremely tricky to do safely as it can easily lead to ErrorHandlers triggering ErrorHandlers (causing a log bomb). Logger-local error handlers allow us to configure eg. a primary logger with an ErrorHandler that calls a secondary logger with no ErrorHandler.

Event struct was rearranged to save space; gofmt adjusted some doc indenting in log.go.

There are some use cases for writing to zerolog from within the
ErrorHandler, but today this is extremely tricky to do safely as it can
easily lead to ErrorHandlers triggering ErrorHandlers (causing a log
bomb). Logger-local error handlers allow us to configure eg. a primary
logger with an ErrorHandler that calls a secondary logger with no
ErrorHandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant