[
https://issues.apache.org/jira/browse/LOG4NET-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625113#action_12625113
]
Ron Grabowski commented on LOG4NET-171:
---------------------------------------
If you have a process running and it has an exclusive lock on a file and
another process comes along and tries to get the lock it won't be able to get
it. Having two processes writing to the same rolling file is generally not a
good idea. How would the two processes communicate when/how to role the file?
Can you append the process id to the filename so there isn't a conflict?
You could use a normal FileAppender and a MutextLock (see the mailing list for
sample code) that would allow two processes to write to the same file.
> Log file locking causing an error to be thrown from the RollingFileAppender
> ---------------------------------------------------------------------------
>
> Key: LOG4NET-171
> URL: https://issues.apache.org/jira/browse/LOG4NET-171
> Project: Log4net
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.10
> Environment: Windows 2003 Server (scheduled jobs/.exe that may be
> overlapping)
> Reporter: Steven Myron
> Priority: Critical
> Attachments: original issue.jpg
>
> Original Estimate: 120h
> Remaining Estimate: 120h
>
> Scheduled processes (~ 15 minutes apart) seem to be overlapping possibly
> causing file sharing violations for the log file that log4net is writing to.
> This file is statically named and is written to using the
> RollingFileAppender. This abruptly terminates the application and presents
> an unexpected error to the client.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.