This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: log4 order of log line on the same milisecond?