File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes log4j Asynchronous log message order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j Asynchronous log message order" Watch "log4j Asynchronous log message order" New topic
Author

log4j Asynchronous log message order

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
When using log4j to asynchronously log messages to a local log file, will the order of the log messages be preserved? (i.e. earliest time stamp will always be first and latest will be last)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

I expect that would depend on how you implemented it. Do you have a specific implementation of asynchronous logging you wanted to ask about?
Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
a simple implementation using the following xml to log to the console........

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

Well, the documentation doesn't specify the answer to your question. There's mention of a "buffer" which to me sounds like an orderly queue of messages, but if that isn't enough then you could examine the source code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j Asynchronous log message order
 
Similar Threads
need to log messages in compressed binary fomat?
log4j doesnt work on WAR files
log4j doesnt work in WAR files
Struts2 interceptors. glassfish VS Tomcat
Log4j RollingFileAppender doesn't write to file in Websphere