开发者

How do I make a log of my application?

How can I 开发者_如何学Cmake a log of my application? Like maybe when an error is catched, it emails the user a log file? Maybe something like this?


log4net is cool

good example to get started: http://sadi02.wordpress.com/2008/06/29/log4net-tutorial-in-c-net-how-can-i-show-log-in-a-file/


The simple built-in method is to use the DebugListener or TraceListener and point their output to a log-file. Of course, log4net offers more options so it's well worth considering too.


Each language tends to have some logging libraries associated with it. sometimes many.

C# and Java have Log4Net and Log4J respectively both under the apache project. Those libraries have been around for a while and have decent tutorials. Python has an excellent logging module built in. In general, google for " logging library" or along those lines.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜