<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
    <contextName>elAdmin</contextName>
    <property name="log.charset" value="utf-8" />
    <property name="log.pattern" value="%contextName- %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />

    <!--输出到控制台-->
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>${log.pattern}</pattern>
            <charset>${log.charset}</charset>
        </encoder>
    </appender>

    <!--普通日志输出到控制台-->
    <root level="info">
        <appender-ref ref="console" />
    </root>

    <!-- Spring 日志级别控制 -->
    <logger name="org.springframework" level="warn" />

    <!-- DnsServerAddressStreamProviders调整为ERROR -->
    <logger name="io.netty.resolver.dns.DnsServerAddressStreamProviders" level="ERROR"/>

    <!-- 设置其他类的日志级别为 ERROR -->
    <logger name="org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]" level="ERROR"/>
    <logger name="org.springframework.web.servlet.DispatcherServlet" level="ERROR"/>
</configuration>