PingAccess logging is handled by the log4j2 asynchronous logging library,
configured using conf/log4j2.xml
.
Audit logs are also configurable in
conf/log4j2.xml
. These logs
record a selected subset of transaction log
information at runtime plus additional details. For
more information, see Security Audit
Logging.
By default, logging information is output to
PA_HOME/logs/pingaccess.log
,
and file logging uses the rolling file appender. PingAccess
keeps a maximum of 10 log files, each with a maximum size of 100
MB. Once 10 files accumulate, PingAccess deletes the oldest. You
can change these defaults by locating and modifying the
following properties in the <Appenders>
section of log4j2.xml
:
-
Changing the log file name
<RollingFile name="File" fileName="${sys:pa.home}/log/pingaccess.log" filePattern="${sys:pa.home}/log/pingaccess.log.%i" ignoreExceptions="false">
-
Setting the maximum log size
<SizeBasedTriggeringPolicy size="100000 KB"/>
-
Setting the maximum number of log files
<DefaultRolloverStrategy max="10"/>
In addition to the standard log4j2 items, PingAccess adds the following
custom item that can be used in the
log4j2.xml<PatternLayout>
configuration.
Item | Description |
---|---|
exchangeId |
Identifies the ID for a specific request/response pair. |
For example, the following line from log4j2.xml
incorporates the exchangeId
in the output.
<pattern>%d{ISO8601} %5p [%X{exchangeId}] %c:%L - %m%n</pattern>
The %X
conversion character is
required for the exchangeId
to be
displayed properly.