[id='configuring_server_logs_cli-{context}']
= Changing {brandname} Server Logging Configuration at Runtime
Modify the logging configuration for {brandname} servers at runtime to
temporarily adjust logging to troubleshoot issues and perform root cause
analysis.

Modifying the logging configuration through the CLI is a runtime-only
operation, which means that changes:

* Are not saved to the `log4j2.xml` file. Restarting server nodes or the entire cluster resets the logging configuration to the default properties in the `log4j2.xml` file.
* Apply only to the nodes in the cluster when you invoke the CLI. Nodes that join the cluster after you change the logging configuration use the default properties.

.Procedure

. Create a CLI connection to {brandname}.
. Use the [command]`logging` to make the required adjustments.

* List all appenders defined on the server:

----
[//containers/default]> logging list-appenders
----

The preceding command returns:

[source,json,options="nowrap",subs=attributes+]
----
{
  "STDOUT" : {
    "name" : "STDOUT"
  },
  "JSON-FILE" : {
    "name" : "JSON-FILE"
  },
  "HR-ACCESS-FILE" : {
    "name" : "HR-ACCESS-FILE"
  },
  "FILE" : {
    "name" : "FILE"
  },
  "REST-ACCESS-FILE" : {
    "name" : "REST-ACCESS-FILE"
  }
}
----

* List all logger configurations defined on the server:

----
[//containers/default]> logging list-loggers
----

The preceding command returns:

[source,json,options="nowrap",subs=attributes+]
----
[ {
  "name" : "",
  "level" : "INFO",
  "appenders" : [ "STDOUT", "FILE" ]
}, {
  "name" : "org.infinispan.HOTROD_ACCESS_LOG",
  "level" : "INFO",
  "appenders" : [ "HR-ACCESS-FILE" ]
}, {
  "name" : "com.arjuna",
  "level" : "WARN",
  "appenders" : [ ]
}, {
  "name" : "org.infinispan.REST_ACCESS_LOG",
  "level" : "INFO",
  "appenders" : [ "REST-ACCESS-FILE" ]
} ]
----

* Add and modify logger configurations with the [command]`set` subcommand

For example, the following command sets the logging level for the
`org.infinispan` package to `DEBUG`:

----
[//containers/default]> logging set --level=DEBUG org.infinispan
----

* Remove existing logger configurations with the [command]`remove` subcommand.

For example, the following command removes the `org.infinispan` logger
configuration, which means the root configuration is used instead:

----
[//containers/default]> logging remove org.infinispan
----
