logback.xml 1.01 KB
<?xml version="1.0" encoding="UTF-8"?>
<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>

	<appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>logback_logs/crm-rest.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>logback_logs/crm-rest.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
			<maxHistory>30</maxHistory><!--日志最大大小 -->
		</rollingPolicy>
		<encoder>
			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
		</encoder>
	</appender>

	<!-- <logger name="cn.runsa" level="info" /> -->
	<!-- project default level <logger name="org.apache.shiro" level="debug" /> -->
	<!--log4jdbc <logger name="jdbc.sqltiming" level="debug"/> -->
	<root level="debug">
		<appender-ref ref="console" />
		<appender-ref ref="rollingFile" />
	</root>
</configuration>