I've attached an enhanced version of FileTarget.as, which uses an optional
timer to avoid the openFile/writeFile/closeFile cycle for every line of
output logged.
The extra file system overhead of opening / closing files for each logged
line can be very high during periods of heavy logging activity. By using a
timeout of say 500 mSecs, your app can log tons of stuff at a very fast
rate, and then the log file will be closed after 500 mSec of no logging.
The default flulsh timeout is still 0 mSecs, which is the existing
behaviour of open/write/close for each line.
But if the flushTimeoutMsecs property is set to a positive number (either
directly or in the constructor call), the timer-based logic will kick in,
for great justice!
Original issue reported on code.google.com by doug.sch...@gmail.com on 8 Jan 2010 at 6:46
Original issue reported on code.google.com by
doug.sch...@gmail.com
on 8 Jan 2010 at 6:46Attachments: