Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sample Configuration File

Code Block
languagexmlbash
(Adjust the paths to fit your environment)
 
/opt/tomcat-portal/tomcat-7.0.42/logs/catalina.out {
copytruncate
daily
rotate 7
compress
missingok
size 50M
}
/opt/tomcat-portal/tomcat-7.0.42/logs/epsos-client-connector.log {
copytruncate
daily
rotate 7
compress
missingok
size 50M
}
...
...
Info
titleConfiguration Parameters

Make sure that the path /opt/tomcat-portal/tomcat-7.0.42/logs/catalina.out above is adjusted to point to your tomcat’s catalina.out

daily - rotates the catalina.out daily
rotate – keeps at most 7 log files
compress – compressesthe rotated files
size – rotates if the size of catalina.out is bigger than 50M

You can put multiple entries in the previous file in order to include several log files for rotation

Test Rotation Performance

Code Block
languagebash
sudo logrotate --force /etc/logrotate.d/openncp  (openncp is the name of logrotate configuration file)

Filter by label (Content by label)
showLabelsfalse
max5
spacesncp
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "openncp" and type = "page" and space = "ncp"
labelsopenncp

...