-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to obtain the 'buf' from the Event in a hook? #637
Comments
I would like something like this too! I have a hook that adds trace data to the logs. In that (or another) hook I would also like to add bits and pieces of the log event to the trace in cases of high severity. However now it's not possible to lift any information out of the zerolog event. a edit: On further reading there seems to be a workable solution here #493 @WUST-mengqinyu would be nicer with something that doesn't involve reflecting though. |
The buf is an internal structure containing the incomplete event in the making. It is not meant to be exposed. |
Or alternatively, is it possible to get the 'Context' in the Writer?
The text was updated successfully, but these errors were encountered: