JGralton
5/20/2008 8:55:00 AM
Hi,
I am trying to log asyncronously using log4net with the following set
up (this shows the basic outline, i have taken out some of the config
to make the post as simple as poss)
<log4net>
<!-- Define some output appenders -->
<appender name="LoggingThreadAppender"
type="Tools.Logging.LoggingThread">
</appender>
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
</appender>
<category name="Tools.Logging.LoggingThread">
<priority value="ALL" />
<appender-ref ref="RollingLogFileAppender"/>
</category>
<category name="MyMainNamespace">
<priority value="ALL" />
<appender-ref ref="LoggingThreadAppender"/>
</category>
<!-- Setup the root category, add the appenders and set the default
level -->
<root>
<level value="OFF" />
<appender-ref ref="RollingLogFileAppender" />
<appender-ref ref="LoggingThreadAppender" />
</root>
</log4net>
Basically what I am trying to do is send all logs through the
LoggingThreadAppender which puts the logs in the queue for a seperate
thread to pull them off the queue and log them through to the
RollingFileAppender.
I have played around with the config a lot and am no closer to a
solution. I am sure I am missing something here but can't see what I
am doing wrong or if this is even possible.
Any help will be appreciated.
Cheers,
James