Configure logger in the Environment #1452
t0bst4r
started this conversation in
Feature requests (vote via thumbs up)
Replies: 1 comment
-
Agreed this would be nice. Looks like there are roughly 150 places we'd need to move away from loggers obtained from the global singleton. Refactoring would be a mix of "create new logger for this instance" and "use caller-supplied logger". So non-trivial editorial decisions for each location and would touch many lines. To mitigate though we could do in passes... And roughly 10% of locations are in deprecated code paths so that helps a bit. Not sure when this would bubble to top of priority list w/ current resources but I'd be happy to help out if someone decides to take on before I get to it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know this would require some larger refactoring but I’d like to be able to configure the logger using the environment. If every class & service would get its logger like this, we could easily intercept, group or split logs.
My use case: my app can have multiple server nodes / bridges. By creating a new environment per server node (using the default env as parent) I could write the logs of each bridge to a different log file, or colorize them differently or capture them per bridge to show it in the Frontend… I think there could be a lot more use cases.
Beta Was this translation helpful? Give feedback.
All reactions