multi log4net instances using different configurations from the same config file -


i writing application require 2 different loggers, each logging in totally different way. when create each instance of log4net logger how can read own config section within same app.config file. possible have seen far taking default

you can log 2 or more things independently without using separate config files.

logmanager.getlogger("log1") logmanager.getlogger("log2") 

then in config file can create them this

<logger name="log1" additivity="false">   <level value="info" />   <appender-ref ref="logfileappender1" /> </logger>  <logger name="log2" additivity="false">   <level value="info" />   <appender-ref ref="logfileappender2" /> </logger> 

by selecting additivity false log separately. can populate appenders write info needed.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -