Issue Details (XML | Word | Printable)

Key: LOG4NET-99
Type: Bug Bug
Status: Closed Closed
Resolution: Invalid
Priority: Trivial Trivial
Assignee: Ron Grabowski
Reporter: Graham
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Log4net

Resolved

Created: 27/Oct/06 12:24 PM   Updated: 23/Dec/06 01:08 AM
Return to search
Component/s: None
Affects Version/s: 1.2.10
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 23/Dec/06 01:08 AM


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham made changes - 27/Oct/06 01:50 PM
Field Original Value New Value
Description Hi,

I wonder if you can throw some light / provide a solution for the problem which I am having using Log4Net under .NET 2.0 (v 1.2.10) (problem also seems to occur under v1.2.9) After setting up a logger to log to the console, provide trace output and to log to an XML file using a minimal lock, the following calls are fine...
(i.e. both messages find their way to the file)

logger.warn(msg);
logger.warn(msg);

this is also works without a problem

logger.fatal(msg);
logger.fatal(msg);

however if I do the following;

logger.warn(msg);
logger.critical(msg);

the second message never gets written to the file. The console error stream tells me it was due to a locking problem. The exact message as follows;

"log4net:ERROR [RollingFileAppender] Unable to acquire lock on file C:\Tests.XML. The process cannot access the file 'C:\Tests.XML' because it is being used by another process."


In addition, if I attempt to open a stream to the file after making a logging call then an exception will be thrown (message similar to above)
UNLESS I open one which is read only

I have also found that although log4net seems to be able to deal with problem when two calls are made in the same scope at the same threshold, (i.e. it will write both messages to the file), but trying to open a stream to the file inbetween calls still throws an exception.



Regards,


Graham

Graham made changes - 27/Oct/06 01:52 PM
Component/s Appenders [ 11601 ]
Environment Windows XP, NET 2.0
Priority Critical [ 2 ] Trivial [ 5 ]
Summary File locking issues Resolved
Ron Grabowski made changes - 21/Dec/06 04:15 AM
Resolution Invalid [ 6 ]
Status Open [ 1 ] Resolved [ 5 ]
Ron Grabowski made changes - 23/Dec/06 01:08 AM
Assignee Ron Grabowski [ ron ]
Resolution Invalid [ 6 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Ron Grabowski made changes - 23/Dec/06 01:08 AM
Resolution Invalid [ 6 ]
Status Reopened [ 4 ] Closed [ 6 ]