We're updating the issue view to help you get more done. 

FileAppender IO improvements via LogListener Watchers


Attached is a new version of the FileAppender from Micha. It logs asyncronously by spinning up a separate thread that stays running for a short while and "watches" an application-scoped queue of messages. The thread holds the log file open while it is running. This avoids the issue of creating many threads that can block each other and it also avoids the file system overhead of opening and closing the log file over and over.

It has not been tested on Adobe CF. It has also not been tested in combination with the RollingFileAppender.cfc class. File rotation logic needs to be rolled into the base FileAppender class and performed inside the thread. Then a flag can be set to enable/disable rotation and the RollingFileAppender will simply set this flag. This will avoid issues with the FileRotator trying to rotate files that the thread has open since the rotation will now happen inside the thread. Also, reduce the frequency of the file size check to eliminate extra file system access on every log action.



Luis Majano


Brad Wood




Fix versions

Affects versions