开发者

Is there a way to redirect Log4Net output to the ASP.NET Trace listener

开发者 https://www.devze.com 2023-03-12 18:14 出处:网络
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 i

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

0

精彩评论

暂无评论...
验证码 换一张
取 消