• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j Asynchronous log message order

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20719
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a simple implementation using the following xml to log to the console........

 
Paul Clapham
Sheriff
Pie
Posts: 20719
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic