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
I think it would be nice if we could set our own way to get a org.slf4j.Logger from the name, for example this could allow returning a fallback logger, when no logging implementation is detected, in this example I could use this method.
I assume this could be implemented by having a mutable property in KotlingLogging, which would get used by KLoggerFactory.logger.
This would also avoid checking the kotlin-logging-to-jul property for every logger, by checking once and using the right factory.
Caveats
This is modifiable by anyone, it could get overwritten by accident by an end user of a library that did set that property
Workarounds
Use your own function to get a KLogger
The text was updated successfully, but these errors were encountered:
I think maybe a better approach is to implement the fallback logger you linked in this lib. I saw many cases that logging was misconfigured in slf4j, and their approach of not logging info messages in that case is something we can consider to change.
I think it would be nice if we could set our own way to get a
org.slf4j.Logger
from the name, for example this could allow returning a fallback logger, when no logging implementation is detected, in this example I could use this method.I assume this could be implemented by having a mutable property in
KotlingLogging
, which would get used byKLoggerFactory.logger
.This would also avoid checking the
kotlin-logging-to-jul
property for every logger, by checking once and using the right factory.Caveats
This is modifiable by anyone, it could get overwritten by accident by an end user of a library that did set that property
Workarounds
Use your own function to get a
KLogger
The text was updated successfully, but these errors were encountered: