Adding a rolling logger for the PMWoGen cron task

You can limit the size and number of log files that are saved for the PMWoGen cron task. You add a cron task logger that rolls over to a new log file when the current log reaches a specified size. Older versions are deleted after a specified number of instances. The log level can be less granular than the level that is specified for the parent cron task logger.

About this task

The PMWoGen cron task can be enabled to automatically generate work orders from preventive maintenance records. Logging activity can be extensive, depending on the number of sites and assets that you maintain.

Procedure

  1. In the Logging application, select the Manage Appenders action and add an appender that is named PMWoGen.
  2. Specify the class file name as psdi.util.logging.MXFileAppender.
  3. Specify the log file name as pmwogencronlog.log.
  4. Specify the maximum file size for the most current log and the number of most recent files to retain. Save your changes.
  5. In the Root Loggers section, filter for the cron task logger and insert a child logger. Name the child logger PMWoGenCronTask.
  6. In the Key field, specify log4j.logger.maximo.crontask.PMWoGenCronTask.
  7. Set the log level to INFO.
  8. Specify the PMWoGen appender and save your changes. Apply the settings.

Results

Logging for the PMWoGen cron task is directed to the new logger. The log file rolls over based on the information that you specified for the appender.