-

Log Rotation Settings

Comments

1 comment

  • Official comment
    Lee

    You will need to modify the configuration settings in your etc/Logs.xml file.

    Add the following attributes in the start tag for log that would would like to rotate:

    rotation-period="1" rotation-unit="days"
    

    It is also necessary to set the file-append element to false and the file-count element to the maximum amount of log files created before the oldest is overwritten.

    An example for rotating the server log once per day, with the last 7 days of logs saved would be as follows:

    <log name="server" rotation-period="1" rotation-unit="days">
         <log-directory>logs</log-directory>
         <file-pattern>%s.log</file-pattern>
         <level>INFO</level>
         <xml-format>false</xml-format>
         <file-limit>0</file-limit>
         <file-append>false</file-append>
         <file-count>7</file-count>
    </log>
    

    More information about log configuration can be found in the documentation at the follow link:

    Log Configuration Documentation

    Comment actions Permalink

Please sign in to leave a comment.