次の方法で共有


NLog: New .Net log engine

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

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

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

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

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

Comments

  • Anonymous
    June 17, 2005
    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.
  • Anonymous
    June 21, 2005
    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.