Skip to content
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

Retrieve logger fields from Zerolog event #587

Open
jackhua222 opened this issue Sep 8, 2023 · 1 comment
Open

Retrieve logger fields from Zerolog event #587

jackhua222 opened this issue Sep 8, 2023 · 1 comment

Comments

@jackhua222
Copy link

I'm planning to use a hook to send logs to elsewhere on top of the logger.
I know that the hook interface is like this:

type Hook interface {
	// Run runs the hook with the event.
	Run(e *Event, level Level, message string)
}

I'm interested to retrieve all the fields I've added to the logger context before sending the logs to elsewhere. I couldn't find anything obvious, is there a way to do this?

@jackhua222 jackhua222 changed the title How to retrieve logger fields from Zerolog event Retrieve logger fields from Zerolog event Sep 8, 2023
@doctaweeks
Copy link

#493 might help

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

No branches or pull requests

2 participants