• Type: Improvement
    • Status: Resolved (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 2.0.0
    • Fix versions: 5.0.0
    • Components: Appenders - File
    • Labels:


      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.

        Gliffy Diagrams




              • Assignee:
                lmajano Luis Majano
                bradwood Brad Wood
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: