NLog: New .Net log engine


You know I’ve been working with logs for some time..


http://blogs.msdn.com/rido/archive/2004/05/07/LogsAndTraces.aspx

http://blogs.msdn.com/rido/articles/FileRollerTraceListener.aspx




today I’ve found a new log API that looks exactly what I want !!

http://nlog.sourceforge.net/index.html











Comments (2)

  1. Rick says:

    Have you found out if the log file is locked by the process that is using it.

    I’m trying to make an application that needs log files that are not locked by multiple processes… Unsuccessful so far.

  2. rido says:

    Yes, NLog allows you to configure the open/close mechanism:

    http://nlog.sourceforge.net/targets.html#File

    KeepFileOpen

    Setting this property to True helps improve performance but is not recommended in multithreaded or multiprocess scenarios because the file is kept locked and other processes cannot write to it which effectively prevents logging.