aspose 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 Head First Android this week in the Android 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
Sheriff

Joined: Oct 14, 2005
Posts: 19672
    
  10

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
Sheriff

Joined: Oct 14, 2005
Posts: 19672
    
  10

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
 
It's not a secret anymore!