Configuring Logging for Applications

Last updated 11 minutes ago

Learn how to configure logging for CoreMedia Applications

LightbulbWhat you will learn

  • Set an application property for the log level
  • Change the log level during runtime with an actuator

Person reading a bookPrerequisites

  • A CoreMedia system

Person in front of a laptopTarget Audience

This guide is for Developers, Administrators.

CoreMedia applications use Logback. The log configuration for each application is packaged into each application JAR archive.

Configuring Logging at Buildtime

To configure the log level of a specific logger, you only need to set an application property, which follows the Spring Boot standard for log configuration. You can set the property in any of the locations described at Externalized Configuration.

If for example you want to set the log level of the com.coremedia logger to debug, set the following property and restart the application.

logging.level.com.coremedia=debug

Configuring Logging at Runtime

If you want to change the log level of a logger at runtime without a restart, you can use the logger management actuator for an application.

Prerequisites

  • The endpoint must be accessible via the actuator, defined via management.endpoints.web.exposure.include. By default, the property is set to "*" in the development environment.

  • The logger’s endpoint must be enabled via the property management.endpoint.loggers.enabled. By default, the property is set to "true".

If that is the case, you can use a simple POST request to set the new level.

Note that CoreMedia applications serve the actuator endpoints on a separate management port, configured via management.server.port (8081 in the CoreMedia Blueprint), and that the web endpoints are exposed below the base path /actuator.

Replace <LEVEL>, <HOST>, <MANAGEMENT_PORT> and <LOGGER> with the respective values.

curl -s -X POST -H "Content-Type: application/json" \
  -d '{"configuredLevel": "<LEVEL>"}' \
  http://<HOST>:<MANAGEMENT_PORT>/actuator/loggers/<LOGGER>

Please refer to the official Spring documentation for more details.

Configuring Other Logging Characteristics

If you want to change other logging characteristics, set the corresponding Spring Boot logging.* properties, for example logging.pattern.console, logging.pattern.file or logging.file.name. These are set the same way as the log level properties described above.

For settings that cannot be expressed as properties, add a src/main/resources/logback-spring.xml file to the Spring Boot application module before building it. Note that the CoreMedia Blueprint no longer ships such files, so you have to create them yourself.

Copyright © 2026 CoreMedia GmbH, CoreMedia Corporation. All Rights Reserved.Privacy | Legal | Imprint
Loading...