mirror of https://github.com/longtai-cn/hippo4j
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.1 KiB
49 lines
2.1 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<configuration debug="false" scan="false">
|
|
<springProperty scope="context" name="appName" source="spring.application.name" defaultValue="hippo4j-server" />
|
|
<springProperty scope="context" name="logPath" source="hippo4j.logs.path" defaultValue="${hippo4j.home}/logs" />
|
|
<springProperty scope="context" name="logLevel" source="logging.level.root" defaultValue="INFO" />
|
|
|
|
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5level %msg%xEx%n%n" />
|
|
|
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
<encoder>
|
|
<pattern>${FILE_LOG_PATTERN}</pattern>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<appender name="file-all" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>${logPath}/${appName}-info.log</file>
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
<fileNamePattern>${logPath}/${appName}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
<maxFileSize>50MB</maxFileSize>
|
|
<maxHistory>30</maxHistory>
|
|
</rollingPolicy>
|
|
<encoder>
|
|
<pattern>${FILE_LOG_PATTERN}</pattern>
|
|
<charset>UTF-8</charset>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<appender name="file-error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>${logPath}/${appName}-error.log</file>
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
<fileNamePattern>${logPath}/${appName}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
<maxFileSize>50MB</maxFileSize>
|
|
<maxHistory>30</maxHistory>
|
|
</rollingPolicy>
|
|
<encoder>
|
|
<pattern>${FILE_LOG_PATTERN}</pattern>
|
|
</encoder>
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
<level>ERROR</level>
|
|
</filter>
|
|
</appender>
|
|
|
|
<root level="${logLevel}">
|
|
<appender-ref ref="file-all" />
|
|
<appender-ref ref="file-error" />
|
|
</root>
|
|
</configuration>
|