log4net - How to check whether the log is enabled or disabled? -


i trying check whether log enabled or disabled based on ini file. have check condition every time whether enabled or disabled. have check log file enabled or disabled once , use everywhere. how can this?

if ("true".equals(m_objglobalconfig.soaplog))    {      log.errorformat(se.message + environment.newline + environment.newline, se.stacktrace);    } 

is there can customization appender ?

you disable log4net initialization based on parameter, prevent log4net being configured , logging:

during initialization of program :

if ("true".equals(m_objglobalconfig.soaplog)) {     log4net.config.xmlconfigurator.configureandwatch(new system.io.fileinfo("path/to/file")); } 

and can log normally


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -