Configuring log levels
Define log levels for specific package or class names in the log4j2.xml file to get more or less detailed logging from a class or group of classes.
About this task
Class or package loggers are defined in the <AsyncLogger>name attribute. For example, the following line enables cookie logging:
<AsyncLogger name="com.pingidentity.pa.core.interceptor.CookieLoggingInterceptor" level="TRACE" additivity="false" includeLocation="false">
<AppenderRef ref="File"/>
</AsyncLogger>
|
If you don’t specify a log level for a particular package or class, it inherits the settings for the root logger. |
For information on how to configure log levels in the administrative console instead, see Log settings.
To configure the log level for a class or package in the log4j2.xml file:
Steps
-
Open
conf/log4j2.xmlin a text editor. -
Locate the
<AsyncLogger>element for the package or class you want to adjust the logging level for.Example:
<AsyncLogger name="com.pingidentity" level="DEBUG" additivity="false" includeLocation="false">
-
Set the
levelvalue in the<AsyncLogger>element to one of the following values:OFF,FATAL,ERROR,WARN,INFO,DEBUG, andTRACE.Example:
To apply
TRACElevel logging for thecom.pingidentitypackage, locate the following line:<AsyncLogger name="com.pingidentity" level="DEBUG" additivity="false" includeLocation="false">
Change it to:
<AsyncLogger name="com.pingidentity" level="TRACE" additivity="false" includeLocation="false">
-
Save the modified file.
Result
PingAccess automatically makes the changes effective within 30 seconds.