---
title: Configuring log levels
description: 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.
component: pingaccess
version: 9.0
page_id: pingaccess:configuring_and_customizing_pingaccess:pa_configuring_log_levels
canonical_url: https://docs.pingidentity.com/pingaccess/9.0/configuring_and_customizing_pingaccess/pa_configuring_log_levels.html
revdate: August 9, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
  example-2: Example:
  result: Result
---

# 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](../pingaccess_user_interface_reference_guide/pa_log_settings.html).

To configure the log level for a class or package in the `log4j2.xml` file:

## Steps

1. Open `conf/log4j2.xml` in a text editor.

2. 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">
   ```

3. Set the `level` value in the `<AsyncLogger>` element to one of the following values:

   `OFF`, `FATAL`, `ERROR`, `WARN`, `INFO`, `DEBUG`, and `TRACE`.

   ### Example:

   To apply `TRACE` level logging for the `com.pingidentity` package, 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">
   ```

4. Save the modified file.

## Result

PingAccess automatically makes the changes effective within 30 seconds.
