logback.xml
1.24 KB
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %level %logger{30}:%L - %msg%n</pattern>
</encoder>
</appender>
<appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/logs/gateway-service.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/var/logs/gateway-service.%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %level %logger{30}:%L - %msg%n</pattern>
</encoder>
</appender>
<!-- <logger name="com.example.demo.order" additive="true">
<level value="INFO" />
<appender-ref ref="File" />
</logger>-->
<root level="INFO">
<appender-ref ref="File" />
<appender-ref ref="STDOUT" />
</root>
</configuration>