logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McAninch, Robin J" <mca...@UPMC.EDU>
Subject RE: System.Trace.Diagnostics to log4net
Date Wed, 21 Mar 2007 14:22:54 GMT

This probably isn't the best method but I had an issue similar to yours
where I needed to funnel the messages my different system components
into one log4net output file.  I created a Windows Service that was
blocking on a private MSMQ and writing to my log file.  To get messages
to the queue I created a static object in my components that wrote the
message, stacktrace and severity level (and any other details to pass
on) into a custom object and sent it to the queue.  Now all my messages
get consolidated into a single output file.  Not the most elegant to be
sure but in my case I have an assortment of services, web projects, and
class libraries and no hierarchy from which to instantiate a single
log4net logging model.  

Perhaps this may be of some help


-----Original Message-----
From: Widerberg Marcus [mailto:Marcus.Widerberg@tetrapak.com] 
Sent: Wednesday, March 21, 2007 10:06 AM
To: log4net-user@logging.apache.org
Subject: System.Trace.Diagnostics to log4net


I would like to get diagnostics messages (for different wcf services)
routed to log4net and then to the log4net appenders.

Is there a standard way to do this? Basically, I need a tracelistener
for the system diagnostics trace system that sends the messages on to
log4net. A Log4NetListener.

Any help appreciated!

Best regards,


View raw message