Configure log file patterns
- Last Updated: December 30, 2024
- 4 minute read
- OpenEdge
- Version 12.2
- Documentation
The default output patterns for the Tomcat server and the PAS for OpenEdge application components are contained in instance-name/conf/logging-tomcat.properties and instance-name/conf/logging-pasoe.properties, respectively. You can edit the output patterns to capture any Logback information you require.
- what information is logged
- the order in which the information is logged
- what static content is logged
Mapped Diagnostic Context (MDC) tokens are also supported in log output patterns. MDC allows the PAS for OpenEdge instances to dynamically inject request context information into the logging subsystems, where the request contexts can be exposed via tokens in log entry formats.
This topic describes the defaults and supported values for the output pattern of each log file.
Tomcat and Tomcat web application pattern tokens
Logging output patterns, and designated log file names where applicable, can be specified for the following Tomcat server components in instance-name/conf/logging-tomcat.properties:
# Core Tomcat console logging
psc.as.logging.console.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread] %logger{20} -
%msg %n
# OpenEdge oehealth scanner logging
psc.as.logging.oehealth.fileName=oehealth-collector.%d{yyyy-MM-dd}.log
psc.as.logging.oehealth.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread] %logger{36} -
%msg%n
# Core Tomcat client HTTP access loggging
psc.as.logging.access.fileName=localhost-access.%d{yyyy-MM-dd}.log
psc.as.logging.access.pattern=%h %l %reqAttribute{OEReq.userId} [%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}]
"%r" %s %b %reqAttribute{OEReq.requestId} %header{Accept} %n
# Common Tomcat & installed product properties
psc.as.logging.tomcat.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread] %C{36}.%M - %msg%n
The logging pattern supports Logback pattern tokens as described
in the Logback Pattern Layout
documentation. If you make changes the pattern, end the pattern with %n to create a new line after the log entry is
written.
| MDC field | Description |
|---|---|
|
|
Provides client host IP address. |
|
|
Provides the name of the remote log used for the current request. |
|
|
Replaces the Tomcat logging token %r with the OpenEdge Spring authentication user ID. |
|
|
Provides the timestamp of the request. |
|
|
Provides the requested URL and HTTP method. |
|
|
Provides the status code of the HTTP response. |
|
|
Provides the size of the payload or the content length of the response.. |
|
|
Tracks client HTTP requests through the Tomcat, ABL session manager, and multi-session agent. |
|
|
Any standard Tomcat HTTP request headers can be included into your access log. |
|
|
Provides a new line. Ideally it is used at the end of the pattern. |
%responseHeader{http-header} |
Any standard Tomcat HTTP response headers can be included into your access log. |
%reqCookie{cookie} |
Requests the cookie name associated with the session. |
%D |
Provides the elaspsed time in miliseconds of the request. |
requestId value is left-padded hex, so an example output could
be the following: ROOT:w:0000000a.- W = Web
- R = REST
- A = APSV
- S = SOAP
- F = File
- J = When using
noaccess.waras theROOTweb application.
For any request, the Tomcat Access log outputs this format exactly as stated if the pattern was modified.
PAS for OpenEdge application pattern tokens
Logging output patterns can be specified for the following PAS for OpenEdge application components in instance-name/conf/logging-pasoe.properties:
# OpenEdge ABL webapp (oeabl.war) SessionManager & Spring Security logging
psc.as.logging.oeabl.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oeabl.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%X{OEReq.requestId:--} %logger{36} - %msg %n
# OpenEdge ABL webapp login event logging
psc.as.logging.authn.fileName=${CONTEXT_NAME}_authn.%d{yyyy-MM-dd}.log
psc.as.logging.authn.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} ${contextName}
%X{OEReq.requestId} %X{OESec.eventStatus} %X{OESec.loginPrincipal} - %X{OESec.failReason} -
%X{OESec.failDetails}%n
# OpenEdge ABL webapp URL access event logging
psc.as.logging.authz.fileName=${CONTEXT_NAME}_authz.%d{yyyy-MM-dd}.log
psc.as.logging.authz.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} ${contextName}
%X{OEReq.requestId} %X{OESec.eventStatus} %X{OESec.authzUserId} [%X{OESec.failObj}]
%X{OESec.failAttrs} - %X{OESec.failReason}%n
# OpenEdge remote manager web application
psc.as.logging.oeman.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oeman.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%logger{36} - %msg%n
# OpenEdge STS service ( for OpenEdge Authentication Gateway )
psc.as.logging.oests.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oests.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%logger{36} - %msg%n
# OpenEdge PASOE health scanner service
psc.as.logging.oehealth.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oehealth.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%logger{36} - %msg%n
# OpenEdge PASOE remote debugger service
psc.as.logging.oedbg.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oedbg.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%logger{36} - %msg%n
# OpenEdge PASOE reverse-proxy service
psc.as.logging.oeproxy.fileName=${CONTEXT_NAME}.%d{yyyy-MM-dd}.log
psc.as.logging.oeproxy.pattern=%date{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level [%thread]
%logger{36} - %msg%n
The logging pattern supports Logback pattern tokens as described
in the Logback Pattern Layout
documentation. If you make changes the pattern, end the pattern with %n to create a new line after the log entry is
written.
The OpenEdge ABL web application log file (abl-app-name.date.log), which includes the
Session Manager and Spring Security logs, supports the following MDC fields
which are designated by the %X token:
| Logging Field Name | Logging Field Description | Tomcat Access Log Syntax | ABL Application Log Syntax |
|---|---|---|---|
OEReq.userId |
The Spring Security authenticated user-id who is identified as the client from the server. | %{OEReq.userId}r |
%X{OEReq.userId} |
OEReq.sessionId |
The HTTP Session ID assigned to the current PAS for OpenEdge client login session (if server login sessions are configured) | %S |
%X{OEReq.SessionId} |
OEReq.requestId |
The PAS for OpenEdge assigned request Id relative to the server instance (Note: This property is not unique across load balanced server instances.) | %{OEReq.requestId}r |
%X{OEReq.requestId} |
OEReq.webapp |
The Java web application context name the PAS for OE client request executes in | n/a | %X{OEReq.webapp} |
OEReq.transport |
The {apsv | soap | rest | web | file} PAS for OE service interface transport name the client's request executes in | n/a | %X{OEReq.transport} |
OEReq.remoteHost |
This field contains the remoteHost DNS address obtained from the PAS for OE network connection | %h |
%X{OEReq.remoteHost} |
OEReq.remoteAddr |
This field contains the remoteHost IP address obtained from the PAS for OE network connection | %a |
%X{OEReq.remoteAddr} |
OEReq.serverName |
This field contains the name of the PAS for OpenEdge server | %v |
%X{OEReq.serverName} |
OEReq.URI |
This field contains the HTTP request's
relative URI within OEReq.webapp |
n/a | %X{OEReq.URI} |
OEReq.protocol |
This field contains the HTTP request scheme (http / https) | %H |
%X{OEReq.protocol} |
OEReq.method |
This field contains the HTTP request's method name | %m |
%X{OEReq.method} |
OEReqHead.xxxxxx |
This field contains the value of the HTTP request Header named xxxxxx or n/a if the header does not exist. | %{xxxxxx}i |
%X{OEReqHead.xxxxxx} |
Formatting Options for MDC values in ABL Spring and Session Manager logs
MDC values can be written to print a certain value if the requested information is not available. This is useful for troubleshooting. If an error occurs before the request-Id, or other MDC field, is created, then the log can print a specified value.
|
For example:
|
|
The log shows the assigned request ID or blank if the logging occurs before a request ID can be created. |
|
|
The log shows the assigned request ID or "-" if the logging occurs before a request ID can be created. |
|
|
The log shows the assigned request ID or "na" if the logging occurs before a request ID can be created |
Supported MDC field names for Spring Authentication and Authorization logs
The Spring Authentication and Spring Authorization audit logs monitor for different events. Spring Security Authentication monitors for login pass/fail events. Spring Security authorization monitors for URL access events.
Spring Authentication logging fields
The OpenEdge ABL web application login event log file (abl-app-name_authn.date.log supports the following MDC fields which are
designated by the %X token:
| MDC field name | Logging Field Description | ABL Application Log Syntax |
|---|---|---|
OESec.eventType |
The type of Spring Security process being reported: "Authentication" | %X{OESec.evnetType} |
OESec.eventStatus |
The results of the client authentication process: { "success" | "failure" } | %X{OESec.eventStatus} |
OESec.loginPrincipal |
The client asserted account name for authentication | %X{OESec.loginPrincipal} |
OESec.failReason |
A simple string holding the reason for the authentication failure | %X{OESec.failReason} |
OESec.failDetails |
A more verbose string hold additional failure information | %X{OESec.failDetails} |
OEReq.xxxxxx |
The value of the HTTP Request. | %X{OEReq.xxxxxx} |
OEReqHead.xxxxxx |
The value of the HTTP Request Header. | %X{OEReqHead.xxxxxx} |
OEReq and OEReqHead MDC field
names, see the Supported HTTP Request MDC Field Names for
Spring Security and Session Manager logs table above.Spring Authorization logging fields
The OpenEdge ABL web application URL access event log file
(abl-app-name_authz.date.log supports the following MDC fields which are
designated by the %X token:
| MDC Field Name | Logging Field Description | ABL Application Log Syntax |
|---|---|---|
OESec.eventType |
The type of Spring Security process being reported: "Authorization" | %X{OESec.eventType} |
OESec.eventStatus |
The results of the client authentication process: { "granted" | "denied" } | %X{OESec.eventStatus} |
OESec.authzUserId |
The authenticated client's account name whose ROLEs are tested for URL access | %X{OESec.authzUserId} |
OESec.failObj |
The URL resource name being authorized | %X{OESec.failObj} |
OESec.failAttrs |
The authenticated client's account attributes used for authorizing URL access | %X{OESec.failAttrs} |
OEReq.xxxxxx |
The value of the HTTP Request. | %X{OEReq.xxxxxx} |
OEReqHead.xxxxxx |
The value of the HTTP Request Header. | %X{OEReqHead.xxxxxx} |
OEReq and OEReqHead MDC field
names, see the Supported HTTP Request MDC Field Names for
Spring Security and Session Manager logs table above.