I am trying to adopt Common.Logging in our application, however I am having some trouble setting it up with system.diagnostics. It works with straight up Trace, but not TraceSource. I was using Common.Logging.Simple.TraceLoggerFactoryAdapter. Do i need a different adapter for TraceSource?
相关问题
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
- Django management command doesn't show logging
- apache modules ap_log_perror is at a different lev
相关文章
- how do I log requests and responses for debugging
- Android Studio doesn't display logs by package
- Stacktrace does not print in Glassfish 4.1 Cluster
- Out of curiosity — why don't logging APIs impl
- Laravel log file based on date
- Java -How to get logger to work in shutdown hook?
- Codeigniter not logging
- Is there any way to remove the information line fr
This is pretty late, but maybe it will still help you...
According to the Common.Logging source here, the TraceLoggerFactoryAdapter does support configuring such that it uses TraceSources. The TraceLoggerFactoryAdapter has a property (that is configurable in app.config file) called "useTraceSource". If that is set to "true", it should cause the TraceLoggerFactoryAdapter to dispense TraceLoggers that use a TraceSource internally. Note that according to the Common.Logging documentation here, "useTraceSource" is not documented.
So, you should be able to configure your TraceSources in the System.Diagnostics section of your app.config and tell Common.Logging to use those TraceSources by specifying the TraceLoggerFactoryAdapter and the "useTraceSource" property in the Common.Logging section of the app.config.
Good luck!