What is Deferred Logging for PASOE
Since OpenEdge 11.7.6, 12.1 a deferred logging feature for PASOE was introduced.
- The deferred logging feature allows an on-demand monitoring check against an online PAS instance, without affecting massive log files for the remainder of the session.
- The in-memory buffer is configured independently from MSAgent logging and automatically writes to the agent log file. In this way the deferred logging buffer can be used to act as a stack trace preceding crash events, or set it to record a separate log entry type from that configured in the openedge.properties file for the MSAgent log.
- When enabled, an in-memory buffer is opened to record information immediately preceding a multi-session agent crash or at any time it is called:
- If a PAS for OpenEdge multi-session agent crashes with deferred logging enabled, the buffer memory is automatically printed to the abl-app-name.agent.datestamp.log file.
- Additionally, a System Administrator or DevOps engineer can use a REST or JMX API to dump the in-memory buffer to the agent log file for detailed monitoring of a production system.
How is Deferred Logging for PASOE enabled ?
- The Deferred Logging feature is configured in the {CATALINA_BASE}/conf/openedge.properties file.
- Three properties control how much in-memory logging information is stored.
- The deferred logging buffer is enabled only if all three properties are set to a non-zero value:
- defrdLogNumLines
- defrdLoggingLevel
- defrdLogEntryTypes
How to enable Deferred Logging for a PAS Server instance ?
As with any MSAgent configuration, the Deferred Logging properties can be configured directly in the openedge.properties file, in the OE Console UI, or using the oeprop command line, which the following example demonstrates.
1. Use oeprop to specify the number of lines to be saved in the deferred logging buffer:
oeprop.{bat|sh} AppServer.SessMgr.defrdLogNumLines=1000
|
Two types of log entries can be written to the buffer:
- Conditional entries which are based on logging-level and startup type.
- Unconditional entries, include start-up and error events which use some lines specified with this property.
- The default value is 0, which disables the feature.
2. Use oeprop to specify the deferred logging buffer's logging level:
oeprop.{bat|sh} AppServer.SessMgr.defrdLoggingLevel=4
|
3. Use oeprop to specify deferred logging buffer's log entry types:
oeprop.{bat|sh} AppServer.SessMgr.defrdLogEntryTypes=4GLTrace
|
- The default is the
4GLTrace log entry type. - When this property is set to 0, no deferred log file buffer is written to the agent log file.
NOTE: Not all standard logentrytypes are supported for PASOE Deferred Logging
The following agent log entry types are currently supported for deferred logging:
4GLTraceASPlumbingUBNETDB.Connects
To view the collected data it will be necessary to trigger the AppServer to write the information to disk using either REST API calls or OEJMX queries.
If the activity rate of the PASOE instance is very high volume it is recommended to have defrdLogNumLines be set higher than the example to capture as much as possible per agent for analysis of a crash.
There is a great video discussing this new deferred logging functionality in the Notes Section below.
NOTE: Deferred logging will cause additional memory to be used by the PASOE agent.
The amount of memory is dependent on the size of the output lines and number of output lines deferred logging is configured to cache.
The method to calculate approximate memory usage is:
#lines * length of lines = bytes of RAM
With higher levels of logging lines may get very long, consider using 500 as the average length of the line.
With very verbose output such as 4GLTrace it may be necessary to capture a large number of lines if the flow of activity is very great. It is recommended to test with several 100k lines and adjust up or down as needed to capture the needed amount of data when deferred logging is triggered.