logger icon indicating copy to clipboard operation
logger copied to clipboard

feat: add option to pass context to logger

Open mgabeler-lee-6rs opened this issue 2 months ago • 0 comments

Adds WithContext() option that will cause the gin context to be passed to the zerolog event via logger.Ctx(...)

This is useful for zerolog hooks to be able to attach additional metadata, such as tracing span IDs and other contextual metadata to the event.

mgabeler-lee-6rs avatar May 15 '24 14:05 mgabeler-lee-6rs