Forum Discussion

Petrica's avatar
Petrica
New Contributor II
8 years ago
Solved

How can i setup logrotate for jcc_output.log?

Hi all,

How can i setup logrotate for jcc_output.log ?
in this moment this log is very big on all snaplogic servers ( 60 GB ) and i need to know how can i configure logrotate for these logs.

Best regards,
Petrica

  • The logs which are written to by the JCC are automatically rotated as required. The log settings are configurable in the Snaplex properties.

    jcc_output.log is the stdout of the JCC process, not much output goes to the stdout usually and it is not automatically rotated. To enable log rotation for the stdout, ensure logrotate is configured on the machine and then create the file /etc/logrotate.d/jcc with the contents

    /opt/snaplogic/run/log/jcc_output.log /opt/snaplogic/run/log/monitor.log {
        copytruncate
        compress
        size 100M
        rotate 10
        notifempty
    }
    

    To verify the logrotate configuration, run

    sudo logrotate -vf /etc/logrotate.d/jcc

    If the existing log is large, the first rotation can be slow because of the file copy required. To manually truncate the log file before enabling logrotate, do

    sudo truncate -s 0 /opt/snaplogic/run/log/jcc_output.log