tags:

views:

129

answers:

3

How can I make a log of my application? Like maybe when an error is catched, it emails the user a log file? Maybe something like this?

+4  A: 

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/

jspcal
It seems complicated. I downloaded it so is there a dll or something?
Mohit Deshpande
the dll is in \bin\net\2.0\release\log4net.dll
jspcal
+1  A: 

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.

STW
A: 

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.

UnwashedMeme