Hi,
I use Common.Logging in a few projects with log4net and I was wondering how can I understand if a logger has been declared.
In the class LogManager of log4net there is the method Exists, but I found none in the LogManager class of Common.Logging.
This would be useful because I have configured a root logger, and I wish to write logs in a specific logger only if it is configured, and using LogManager.GetLogger(string) gives me the root logger if the string is not a valid logger
How can I achieve that?
Hi, I use
Common.Logging
in a few projects withlog4net
and I was wondering how can I understand if a logger has been declared. In the classLogManager
oflog4net
there is the methodExists
, but I found none in theLogManager
class ofCommon.Logging
. This would be useful because I have configured a root logger, and I wish to write logs in a specific logger only if it is configured, and usingLogManager.GetLogger(string)
gives me the root logger if the string is not a valid logger How can I achieve that?