I 开发者_如何学编程have a significant amount of logging code throughout our codebase which uses log4net. Generally this is logged to an external output file. In this case I would like to know if there is a log4Net configuration change I could make to get this log information to show up in the ASP.NET pages trace output.
I'm just looking to redirect the output, not implement a different type of logging.
Check out the ASP.NET Trace Appender: http://logging.apache.org/log4net/release/sdk/log4net.Appender.AspNetTraceAppender.html
Config example here:
http://logging.apache.org/log4net/release/config-examples.html
精彩评论