You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The slog logger is having an option to turn on source with AddSource: true handler option. This will show the caller with line no in the log.
Due to wrapper around slog in the watermill, it always shows the following line for debug and same for other log levels -
The text was updated successfully, but these errors were encountered:
ganeshdipdumbare
changed the title
Slog with AddSource: true is not working correctly due to wrapper in watermill
Slog with AddSource: true is not working correctly due to wrapper in watermill
Oct 24, 2023
Description
The slog logger is having an option to turn on source with
AddSource: true
handler option. This will show the caller with line no in the log.Due to wrapper around slog in the watermill, it always shows the following line for
debug
and same for other log levels -As per my finding the issue is slog is getting the caller at the following line no -
https://cs.opensource.google/go/go/+/refs/tags/go1.21.3:src/log/slog/logger.go;l=217
I have done quick fix while creating slog logger handler by adding following code
The text was updated successfully, but these errors were encountered: