Bug 3 - file sharing
Summary: file sharing
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
: 61936 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-01-08 11:35 UTC by matthew_scully
Modified: 2021-06-30 13:43 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthew_scully 2001-01-08 11:35:03 UTC
I am running a servlet on a jakarta-tomcat (apache) server which uses log4j and 
while the servlet is running I am unable to view the log file because of a 
sharing violation:

"The document d:\.....\logfile is in use by another application and cannot be 
accessed."

I have to shutdown the server in order to view the logfile, I think this is a 
bit much.  I'm guessing the file isn't being closed after the appenders write 
to it, can this be fixed or is it necessary for log4j?

Thank you very much for your help, I have been very satisfied thus far with the 
flexibility of log4j.

--matt
Comment 1 BugZilla Maintainer Account 2001-01-11 14:29:29 UTC
Matt,

Sorry for not replying earlier. I have been thinking about this problem. This 
is clearly a OS related problem. Which OS is this by the way?

Openning/closing a file with each append would be very slow. Moreover, it 
wouldn't solve the problem because while the viewer had the log file open 
logging would fail. Not a good thing. 

I suggest you investigate how your OS handles opens files and whether there is 
not a way to allow simultaneous opens of the same file. Hope this helps, Ceki
Comment 2 Ceki Gulcu 2002-04-25 13:27:27 UTC
Is this problem still bothering you?
Comment 3 moultryjermaine 2017-12-30 16:58:47 UTC
*** Bug 61936 has been marked as a duplicate of this bug. ***