[英]Postsharp logging to a text file in C#
I am fairly new to using PostSharp. 我对使用PostSharp很陌生。 I have been able to get it to output trace messages to a the System.Console backend, but can anyone give me a basic sample as to how output the trace messages to a simple text file please?
我已经能够将跟踪消息输出到System.Console后端,但是任何人都可以给我一个有关如何将跟踪消息输出到简单文本文件的基本示例吗?
What you could do is, 你能做的是
Update : 更新 :
There is an extension for PostSharp using Log4Net, see 使用Log4Net的PostSharp有一个扩展,请参阅
http://www.postsharp.net/blog/post/postsharp-toolkits-update-support-for-log4net-and-system-diagnostics-trace http://www.postsharp.net/blog/post/postsharp-toolkits-update-support-for-log4net-and-system-diagnostics-trace
Just google for log4net and PostSharp, it will point you in the right direction. 只需在谷歌搜索log4net和PostSharp,它将为您指明正确的方向。
http://www.lobsterfs.co.uk/blog/postsharp-and-log4net/ http://www.lobsterfs.co.uk/blog/postsharp-and-log4net/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.