Last post Feb 10, 2015 08:20 AM by johnr11
Sep 20, 2010 04:31 AM|arun18|LINK
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.
"Enterprise Library 2.0"
Enterprise Library 2.0- Logging Application Block
Patterns & Practices
flat file logging
how to start Microsoft Enterprise Library 3.1 application blocks
Microsoft Application Block
Enterprise Libraries 4.1
Aug 21, 2012 03:27 PM|dotnetfighter|LINK
HI, I am facing the same issue. Did you find any solution ? Pls let me know.
Feb 10, 2015 08:20 AM|johnr11|LINK
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.