tags:

views:

128

answers:

5

can anyone help me in creating a "logfile" to write all the exceptions that occur in C#

+1  A: 

You can use a logging framework like log4net

Scoregraphic
I like this one too :-)
Seb
+2  A: 

http://logging.apache.org/log4net is the standard tool in my experience.

+1  A: 

For logging only exceptions take a look at elmah for other logging look at log4net

David G
+2  A: 

Instead of writing your own logging framework, you can use one of the following:

Enterprise Library Logging Application Block

Nlog

log4net

šljaker
+2  A: 

Apart from the already suggested frameworks, there is also built-in tracing support in the .NET Framework.

Fredrik Mörk
Built-in traces are a very good tool, and you can also turn them on and off in runtime using TraceSwtiches. I'll prefer this approach instead of relying on 3rd party libraries.
munissor