You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2004/07/26 16:30:58 UTC

DO NOT REPLY [Bug 30323] New: - using log4j to same logging file for more than one process corrupted

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30323>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30323

using log4j to same logging file for more than one process corrupted

           Summary: using log4j to same logging file for more than one
                    process corrupted
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Appender
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: axel.bartsch@siemens.com


I want to write into a logging file with log4j from an application that 
consists of 3 processes (=JAVA VMs).
Each process calls
String configFileName = "log.properties";
PropertyConfigurator.configure(configFileName);
tfl = Logger.getLogger("debug");
and then logs e.g. with
tfl.debug("hello");

The loggging file gets corrupted:
- each process writes into it, after a while 0Hex whitespace is added to the 
logging file
- there is output-process1, whitespace, output-process2, whitespace, output-
process3, whitespace
- some trace outputs are missing
-timestamps start new with each output-processX

If I call PropertyConfigurator more than once for the same process I get the 
error:
log4j:ERROR Attempted to append to closed appender name [Trace]

Using log4j to write into the same log-file for applications that consist of 
more than one process is not working?
Will there be a bug correction or an enhancement.

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