1. White Star Software
  2. Advanced Alerting Configuration

Log Rotate

Log Rotate

ProTop includes two scripts for managing Progress log files.

lgrot.sh - copies the current database log file to a new name and then truncates the existing log.

Usage: bin/lgrot.sh [friendlyName from etc/dblist.cfg|

Example entry in etc/schedule.cfg:

 1 0 * * 0 foreachdb.sh lgrot.sh > ${PTTMP}/foreachdb_lgrot.err 2>&1 

Uncomment the line above and lgrot.sh will be run for each database you have defined in etc/dblist.cfg at 1 minute past midnight every Sunday

logrotate.sh is a log rotater and archiver for Progress OpenEdge log files. It can be configured to filter out lines containing certain strings when archiving.

logrotate Components

  • [PROTOPDIR]/bin/logrotate.sh
  • [PROTOPDIR]/bin/localenv
  • Log Filter file - A file containing one string per line. Log entries containing those strings will be filtered out when the logs are archived
  • Your scheduler (cron, task scheduler or etc/schedule.cfg)

Set Up Log Rotation

  1. [Optional] Create your Log Filter file, including one string per line. See example below.
  2. Edit [PROTOPDIR]/bin/localenv to search for and set the following variables. If it does not already exist, copy bin/localenv.x to bin/localenv
  3. set LOGHIST to the number weeks of full logs to keep
  4. set FLOGHIST to the number of weeks of filtered logs to keep
  5. set LGARCDIR to the explicit path name of the log file archive directory
  6. If created above, set LGFILTER to the explicit path name of your Log Filter file
  7. Add [PROTOPDIR]/bin/logrotate.sh to your cron, task scheduler or etc/scheduler.[*].cfg

Contents of a Log Filter file, e.g. [PROTOPDIR]/etc/logrotate.filter:


NOTE: Ensure there is NO blank line at the end of the Ignore List file.