• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4 order of log line on the same milisecond?

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

we have a multi threaded app which uses rolling file appenders, however, i've noticed that there are times where several different lines may be written on on the same milisecond time signature. and that they may have NOT been executed in the same order they are displayed.

is this possible? how can i make sure the order of writing is maintained with the order of execution.
 
Paul Clapham
Sheriff
Pie
Posts: 20208
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't, really. That's because when you have operations which occur in two different threads, it isn't necessarily possible to tell which of them occurred first. Especially when the operations are not atomic, and writing to a log file certainly wouldn't be atomic.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic