1

i cannot turn off debug logs in console even after setting in configuration like this->

<configuration>
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    <root level="INFO">
        <appender-ref ref="CONSOLE"/>
    </root>
</configuration>

i have added slf4j api and lockback classic implementation, im using spring core, aop and context dependencies too.

<dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.7</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.4.11</version>
        <scope>compile</scope>
    </dependency>

tried to remove debug logs but couldnt

alpha
  • 19
  • 4
  • 1
    Is there any chance you have a property named `debug` in your application.properties or application.yml set to true? Or the loggers can also be configured through the `logging.level` properties. There aren't enough details in your question to answer effectively. – lane.maxwell Aug 10 '23 at 21:15
  • Spring is using it application.properties (or yml) file to set the log levels. `logging.level.your.package.here=INFO`. See https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.logging – Anders Lindgren Aug 10 '23 at 21:17
  • @AndersLindgren Correct you are, but this can be overridden in the application's property files. For instance, if the OP has the property, `logging.leve.org.springframework`, set to DEBUG in their properties, this would explain why they're still getting the debug logs. – lane.maxwell Aug 11 '23 at 03:58

0 Answers0