activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Lugt <>
Subject Re: Using ActiveMQ from .NET compact framework
Date Thu, 12 Oct 2006 13:29:45 GMT

Oleg Deribas-5 wrote:
> It would be nice to have possibility to use log4net from this static
> Trace class. Something like:
> #if LOG4NET
>   // use log4net for output
> #else
>   // use internal tracing routines
> #endif

I agree that it should be simple to plug a Log4Net logger into the Trace
class, but I'm not sure that conditional compilation would be the most
effective way to do this.  I'm concerned this may complicate the project
files and it's possible (if unlikely) that a client would want to modify
this at runtime.  Another way to implement this could be in the form of an
Observer or an Adaptor pattern.  The Observer pattern (via a delegate) would
be appropriate if we wanted to facilitate multiple Trace destinations (e.g.
Log4Net and Diagnostics.Trace) but this may be overkill (esp. as Log4Net
already provides this) and less efficient.  Perhaps a simple Adaptor is
what's needed.

I need improved tracing right now, so I'll raise a Jira and upload an
example implementation.  

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message