In the
OpenEdge 11.7, 12.0 releases, standard Tomcat logging is used for the core Tomcat logs.
- Logfiles roll daily using a TimeBasedRollingPolicy, with a log file with a new date stamp defined in {CATALINA_BASE}/conf/logging.xml
- There is no provision for rolling the logs based on size or for deleting older logs.
- The log files that roll daily, but have no provision for size or age include:
catalina.<date>.log
catalina.out
host-manager.<date>.log
localhost.<date>.log
localhost-access.<date>.log
manager.<date>.log
<instancename>.agent.log (default in 12.x, see following note)
The PAS MS Agent logfile rolling is configured differently. For further information refer to Article:
The reason size is not used for rolling log files in PASOE:
- The logging of client request executions in a Tomcat oeabl web application environment can possibly span multiple log files.
- All of these log files have a defined time that they roll-over to new versions
- The multi-session's log needs to roll-over at the same time to not overly complicate log-file analysis.
- The default is to roll-over all the log files at midnight
- Current PASOE logfiles can otherwise manually rolled at any time with "tcman clean -A". Prior to OpenEdge 11.7, this can also be used to archive all current PAS for OpenEdge log files through a cron job or Windows task scheduler. Eventually archived log files can be purged with OS utilities. For further information refer to Article:
PASOE Web application logging uses slf4j and Logback:
- The Logback framework has more functionality than the standard Tomcat logging.
- By default the log files are rolled each day.
- Additional configuration that can be used to roll logs based on size and/or age in logging.xml.
PAS Web App log files that use Logback include:
<instance>.<date>.log
oemanager.<date>.log
oedbg.<date>.log
oewatcher.<date>.log
For each of these, additional configuration can be added to the appropriate
{CATALINA_BASE}/WEB-INF/logging.xml file.
The default rolling policy found in
logging.xml for these logs uses a
TimeBasedRollingPolicy:
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${catalina.base}/logs/${contextName}.%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
Elements can be added to the
TimeBasedRollingPolicy to control its behavior.
The following example modifies the rolling policy to keep a maximum of 30 days of logs and then only a maximum of 3GB total size.
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${catalina.base}/logs/${contextName}.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep only 30 days of logs -->
<maxHistory>30</maxHistory>
<!-- cap the total size of all logs kept to 3GB -->
<totalSizeCap>3GB</totalSizeCap>
</rollingPolicy>
There is alternatively a
SizeAndTimeBasedRollingPolicy.
Similar to the time-based policy, this will roll the logs daily if they don't exceed the size limits and it will also roll the logs based on size.
The following example also rolls daily and keeps a maximum of 60 days of logs with a maximum of 20GB of total size.
However, it also limits the size of each file during the day to 100MB and will roll the files to a numbered sequence of logs.
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${catalina.base}/logs/${contextName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<!-- each file should be at most 100MB -->
<maxFileSize>100MB</maxFileSize>
<!-- keep 60 days worth of history, but at most 20GB -->
<maxHistory>60</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
For additional details, refer to the
Logback Documentation at:
https://logback.qos.ch/manual/