[
https://issues.apache.org/jira/browse/LOG4NET-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626147#action_12626147
]
Steven Myron commented on LOG4NET-171:
--------------------------------------
I guess that can be somewhat tricky to manage when Process A is trying to write
to a file object while Process B is in the middle of rolling the file...right
back to inter-process communication...you first!
Since out program is a console application and is running at a client site, we
assumed this was an unhandled error. It is good that this is only a benign
System.Console.Out.Write... and no logging on that thread will occur (which is
no problem).
We did go with the following to split up some of the logging:
<file type="log4net.Util.PatternString">
<conversionPattern value="logs\%property{prefix}_JobCopDataLoader.log" />
</file>
The above log file naming schema still rolls and archives the logs (which is a
good thing). The only catch was that we had to set the
ThreadContext.Properties["prefix"] before the call to LogManager.GetLogger() is
made.
Mixed output is fine especially if you have tools like Chainsaw or Log4Net
Dashboard to filter and clean up the text. Database logging is a better
strategy (disconnected clients, network topology, and infrastructure a big part
of this decision) and saves the overhead of log file pulls and aggregation.
Great idea to have a failover of a physical log file if database connectivity
becomes an issue!
Thank you very much for you help and I consider this issue closed.
> 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.