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,

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 {
    size 100M
    rotate 10

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

Hi Akidave,

Thank you for your help on this.
This worked like a charm. :slight_smile:

Best regards,

where does the file gets archived after rotation?

Regular logs are backed up into the $SL_ROOT/run/log/backup folder

The stdout being rotated using logrotate configuration specified above will get backed up to files like /opt/snaplogic/run/log/jcc_output.log.1.gz, /opt/snaplogic/run/log/jcc_output.log.2.gz etc