Excessive logging in Spring Boot application

I’m getting excessive logging when running tests. Console output is getting so big, that tooling I use is having problems to handle it (Gitlab is displaying Job’s log exceeded limit of 20971520 bytes and cuts the log).
I’m not sure what enables the DEBUG level, I can’t find anything in my application.properties which sets that level for Camunda classes (some of those entries are logged by EnginePersistenceLogger).

Please advice where to look.

Spring-Boot: (v2.1.0.RELEASE)
Camunda BPM: (v7.10.0)
Camunda BPM Spring Boot Starter: (v3.2.1)

@jmayday is it exception stack trace or Info/debug log messages?

It’s about DEBUG messages. Example:

13:16:18.757 [main] DEBUG org.camunda.bpm.engine.persistence - ENGINE-03009 SQL operation: 'INSERT'; Entity: 'JobDefinitionEntity[id=4]'
13:16:18.757 [main] DEBUG org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity.insertJobDefinition - ==>  Preparing: insert into ...
13:16:18.758 [main] DEBUG org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity.insertJobDefinition - ==> Parameters: 4(String)...
13:16:18.758 [main] DEBUG org.camunda.bpm.engine.persistence - ENGINE-03009 SQL operation: 'INSERT'; Entity: 'JobDefinitionEntity[id=5]'
13:16:18.758 [main] DEBUG org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity.insertJobDefinition - ==> Parameters: 5(String)...
13:16:18.758 [main] DEBUG org.camunda.bpm.engine.persistence - ENGINE-03009 SQL operation: 'INSERT'; Entity: 'DeploymentEntity[id=1]'

Test is annotated with @Deployment and is using ProcessEngineRule.

Hi @jmayday,

setup a logback-test.xml configuration to limit the log level for certain levels.

This is my default:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="debug">
    <appender-ref ref="STDOUT" />
  </root>

  <logger name="org.apache.ibatis" level="info" />
  <logger name="javax.activation" level="info" />
  <logger name="org.springframework" level="info" />

  <logger name="org.camunda" level="info" />
  <logger name="org.camunda.bpm.engine.test" level="debug" />
</configuration>

Hope this helps, Ingo

3 Likes