Configure log levels

Configure the log levels of individual loggers in the OpenShift Dev Spaces server using the CHE_LOGGER_CONFIG environment variable to control log verbosity and simplify troubleshooting.

Before you begin

Procedure

Edit the CheCluster Custom Resource on the cluster:
$ oc edit checluster/devspaces -n openshift-devspaces
spec:
  components:
    cheServer:
      extraProperties:
        CHE_LOGGER_CONFIG: "<key1=value1,key2=value2>"

where:

<key1=value1,key2=value2>

Comma-separated list of key-value pairs, where keys are the names of the loggers as seen in the OpenShift Dev Spaces server log output and values are the required log levels.

For example, to configure debug mode for the WorkspaceManager:

spec:
  components:
    cheServer:
      extraProperties:
        CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"

Results

  • Verify that the log level is applied by checking the OpenShift Dev Spaces server logs:
    $ oc logs deployment/devspaces -n openshift-devspaces | grep -i "log level"