A GUID might be prepended to the filename of the log file RRS feed

  • Question

  • User-1869549859 posted


    Problem Definition:

    I have an asp.net application when i am using microsft enterprise library for logging v4.1.

    I found that a guid is added to the name of my file. I did googling and came to know that because of the following reasons it  is happening:

    A RollingFileTraceListener instance "owns" the log file it is writing to and locks it for exclusive write access when it writes the first log entry. It keeps the file locked until the instance is disposed. If another RollingFileTraceListener  instance is created that points to the same file, before the first instance is disposed, the second instance cannot open this file for writing and will write to a new file with a GUID prepended to its name.

    So my question is how i can overcome this issue?

    Please do reply. Thanks in advance.

    Monday, September 20, 2010 4:31 AM

All replies

  • User357090675 posted

    HI, I am facing the same issue. Did you find any solution ? Pls let me know.

    Tuesday, August 21, 2012 3:27 PM
  • User1889835825 posted

    The conflict occurs when the App Pool attempts to recycle.  The current thread has the log file open, and a new thread is created while the previous thread is being closed.  Overlapping Recycling.   You can attempt to disable that, or write your own text writer that doesn't keep the file open all the time.

    Tuesday, February 10, 2015 8:20 AM