Commit 2c680e46 by ilaotan

fix:日志文件出现两个 原因是spring自身有个File输出 文件里又定制了一个.

parent 97d86778
...@@ -2,17 +2,11 @@ ...@@ -2,17 +2,11 @@
<configuration> <configuration>
<!-- 此xml在spring-boot-1.5.3.RELEASE.jar里 --> <!-- 此xml在spring-boot-1.5.3.RELEASE.jar里 -->
<include resource="org/springframework/boot/logging/logback/base.xml"/> <include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<!-- 开启后可以通过jmx动态控制日志级别(springboot Admin的功能) --> <!-- 开启后可以通过jmx动态控制日志级别(springboot Admin的功能) -->
<!--<jmxConfigurator/>--> <!--<jmxConfigurator/>-->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<Target>System.out</Target>
<encoder>
<pattern>%date [%level] [%thread] %logger{60} [%file : %line] %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${LOG_PATH}${LOG_FILE}</File> <File>${LOG_PATH}${LOG_FILE}</File>
<encoder> <encoder>
...@@ -32,7 +26,7 @@ ...@@ -32,7 +26,7 @@
<!--<logger name="org.apache.kafka.clients.producer.ProducerConfig" level="warn"/>--> <!--<logger name="org.apache.kafka.clients.producer.ProducerConfig" level="warn"/>-->
<root level="INFO"> <root level="INFO">
<!--<appender-ref ref="Console"/>--> <appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/> <appender-ref ref="FILE"/>
</root> </root>
</configuration> </configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment