Search code examples
c#asp.netlogginglogfilestracesource

ASP.Net - File logging with TraceSource


I want to log errors with System.Diagnostics.TraceSource and wonder which Listener I could use and how to configure it so that it logs to Log Files in a specified directory. A new log file should be created when the log reaches a specific size.

Is there an exisiting listener that does this? Or something that comes close?

I know logging to Windows Event Log is best practice, but I cannot easily access the log on the server, so using files I can download through FTP seem to be the best solution.


Solution

  • What about using Log4NET, free and solid, it has all possible kind of appenders and you control everything from the app.config or web.config