Rob Lugt wrote: > >>There is also problem with LoggingTransport - it uses >>System.Diagnostics.Trace.WriteLine method which is also not supported in >>compact framework. I think it could be replaced with log4net. > > I'm surprised System.Diagnostics.Trace is not supported in the compact > framework. I don't use the CF, but this document from MS indicates it is > supported:- > http://msdn2.microsoft.com/en-us/library/system.diagnostics.trace.aspx > > I think Log4net is a great tool, but in a conversation I had with James S > he stated a desire to minimise the dependencies on other libraries - which > I agree with. If Trace is supported, then it probably won't be hard to > register a Listener which simply passes the trace events on to a Log4Net > log - but this will be under the control of the application rather than > the activemq-dotnet library. >
A quick Google just answered my question about Trace support (it isn't):- http://logging.apache.org/log4net/release/sdk/log4net.Appender.TraceAppender.html I think this leaves us with two possible options:- 1) use Log4Net 2) create a static Trace class within the ActiveMQ namespace and pass all trace calls through this. This could then be a central place where trace events are dispatched to the desired logging system. (1) has the advantage that log4net is good and we aren't re-inventing any wheels, but has the disadvantage that we are creating a build dependency on Log4Net - which almost certainly isn't going to be currently used by all the projects targeting AMQ (2) has the advantage that we are creating no dependencies, but we are re-inventing a Trace interface. Of the two, I think I favour (2). If everyone is in agreement I'm prepared to make this a global change today (also replacing code where activemq-dotnet currently writes to the Console. Regards ~Rob (2) -- View this message in context: http://www.nabble.com/Using-ActiveMQ-from-.NET-compact-framework-tf2394775.html#a6772781 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
