Springboot+Mybatis displays sql statement

Add in application.properties

logging.level.com.xxx.service=debug 

com.xxx.service is the package path, generally you can add all the service layer

When using logback log output in another IDEA, the console displays different colors according to the level

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n-->
            <!--</pattern>-->
            <pattern>[%thread] %highlight(%-5level) %cyan(%logger{15}) - %highlight(%msg) %n</pattern>
        </encoder>
    </appender>

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324683336&siteId=291194637