logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Muller" <...@online.no>
Subject RE: File locking in FileAppender
Date Mon, 14 Jul 2003 11:49:30 GMT
Milind,

The appenders are indeed threadsafe. Consult java.io.Writer to learn how
this class controls concurrent write operations. The FileOutputStream are
implemented using native methods and uses OS specific file locks to enforce
concorrency control.

Hope this helps.

--

Thomas

| -----Original Message-----
| From: Milind Rao [mailto:milindr@bellsouth.net]
| Sent: 14 July 2003 12:18
| To: Log4J Users List
| Subject: File locking in FileAppender
|
|
| Is FileAppender thread safe?  I don't see any file locking
| occuring in the FileAppender & WriterAppender classes.
|
| If I have 2 processes writing to the same log file, could I get a
| conflict?
| If I have 2 threads writing to the same log file, could I get a conflict?
|
| I haven't been able to get a conflict, but that of course doesn't
| mean anything.  Threading problems are not that easy to
| simulate.
|
| Category.callAppenders() locks on the category, but that
| shouldn't be doing anything for file locking.
|
|
|
| Regards
| Milind
|
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: log4j-user-help@jakarta.apache.org
|
|



*************************************************************************
Copyright ERA Technology Ltd. 2003. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message