1

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

5 Answers 5

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.
2

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

Comments

2

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

Enterprise Library Logging Application Block

Nlog

log4net

Comments

1

You can use a logging framework like log4net

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.