-
Notifications
You must be signed in to change notification settings - Fork 8
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
Print the name of the logger in the log #41
Comments
I'm honestly kinda surprised that I didn't include that in Meanwhile, Filters are again an easy workaround to this problem:
Sadly you can not use the name logger for the custom field.
Might be that this will be the default behaviour in future versions anyways |
Ah!
|
Oh, nice! I think I was mostly interested in this for the interactive case (i.e. format logger), but the json extra field would be nice as well. I haven't yet worked with the R6 system so the code is a bit magical to me, but it seems like a good investment to spent one hour to read around. There's more packages around using it. |
R6 is pretty cool if you need an object system with mutable objects, so if you have used Java before, R6 classes should be pretty familiar. the internal code of lgr uses |
Seems that i forgot to close this one |
I'm quite fond of using "complicated" logger hierarchies for tracing complicated algorithms, where I can enable/disable parts of the code selectively (by rising/lowering the log levels of various sub-loggers).
However sometimes I get lost in where the messages are coming from. It would be nice if I could log the logger name in the output (mostly using the format layout). I'm used to this from log4j and miss it a little.
Since I ship all my logs to elastic it would also enable me to filter only logs related to a specific part of the application in a very simple way (granted, adding some meta-data directly as asked in #40 would maybe serve this purpose better). But as a low-effort solution it would be sufficient.
The text was updated successfully, but these errors were encountered: