DCImanager 6

Logging level management

The platform uses the journald system service to collect logs. In order to control the amount of data sent to journald, you need to define the LOG_SETTINGS_JOURNALD_LEVEL environment variable in the platform's docker containers and assign it the desired level.

Logging levels in decreasing order of data output:

  • trace — maximum output;
  • debug;
  • info;
  • warning;
  • error;
  • critical — minimum output.

By default, the most heavily loaded components are set to the critical logging level.

Changing the logging level with a patch

Changes will not persist when the platform is upgraded.

To change the logging level:

  1. Create a file ~/patches/patch_log_settings_journald_level.yaml. An example of the file contents for minimal data output:
    version: "3.7"
    services:
      vault:
        environment:
          LOG_SETTINGS_JOURNALD_LEVEL: critical
  2. Apply the patch:
    dci add-patch -p log_settings_journald_level -f ~/patches/log_settings_journal_level.yaml

You can roll back the changes using the command:

dci remove-patch -p log_settings_journal_level

Changing the logging level by editing docker-compose.yaml

  1. Stop the platform:
    dci stop
  2. Open the docker-compose.yaml file.
  3. In the file, find the enviroment section.
  4. Add the environment variable LOG_SETTINGS_JOURNALD_LEVEL and assign it one of the logging level values. Example line for minimum data output:
    LOG_SETTINGS_JOURNALD_LEVEL: critical
  5. Start the platform:
    dci start
Useful tips
Related topics: