Configuring server logging
It is possible to fine-tune the log levels of individual loggers available in the Che server.
The log level of the whole Che server is configured globally using the cheLogLevel
configuration property of the Operator. See CheCluster
Custom Resource fields reference.
To set the global log level in installations not managed by the Operator, specify the CHE_LOG_LEVEL
environment variable in the che
ConfigMap.
It is possible to configure the log levels of the individual loggers in the Che server using the CHE_LOGGER_CONFIG
environment
variable.
Configuring log levels
-
Configure the
CheCluster
Custom Resource. See Using the CLI to configure the CheCluster Custom Resource.spec: components: cheServer: extraProperties: CHE_LOGGER_CONFIG: "<key1=value1,key2=value2>" (1)
1 Comma-separated list of key-value pairs, where keys are the names of the loggers as seen in the Che server log output and values are the required log levels. Example 1. Configuring debug mode for theWorkspaceManager
spec: components: cheServer: extraProperties: CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"
Logger naming
The names of the loggers follow the class names of the internal server classes that use those loggers.
Logging HTTP traffic
-
To log the HTTP traffic between the Che server and the API server of the Kubernetes or OpenShift cluster, configure the
CheCluster
Custom Resource. See Using the CLI to configure the CheCluster Custom Resource.spec: components: cheServer: extraProperties: CHE_LOGGER_CONFIG: "che.infra.request-logging=TRACE"