Luis Valencia
Luis Valencia

Reputation: 34038

Logging and tracing on mvc4

I would like to know what are my options for logging and tracing in mvc4, in my old days I used to use external frameworks, I remember I used log4net many times and also the enterprise library.

I am looking an easy way that I can enable/disable logging and tracing to improve performance. So I would enable logging/tracing only when an unknown exception is occuring.

As I come from the Sharepoint world, there, you can configure different logging levels, verbose, monitorable, high, exceptions, etc.

I wonder if I can do the same with asp.net mvc.

Upvotes: 3

Views: 2570

Answers (1)

Matthew Watson
Matthew Watson

Reputation: 109852

You should be able to use log4net without problems.

We use a different logger, NLog, which definitely works with ASP.NET. It has specific examples for ASP.NET

Here's a blog entry about using NLog with ASP.Net.

Upvotes: 1

Related Questions