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.
55 lines
2.3 KiB
55 lines
2.3 KiB
3 years ago
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
|
||
|
<configuration debug="false" scan="false">
|
||
3 years ago
|
<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"/>
|
||
3 years ago
|
|
||
3 years ago
|
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5level %msg%xEx%n%n"/>
|
||
3 years ago
|
|
||
3 years ago
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||
3 years ago
|
<encoder>
|
||
|
<pattern>${FILE_LOG_PATTERN}</pattern>
|
||
|
</encoder>
|
||
|
</appender>
|
||
|
|
||
3 years ago
|
<appender name="FILE-ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||
3 years ago
|
<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>
|
||
|
|
||
3 years ago
|
<appender name="FILE-ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||
3 years ago
|
<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>
|
||
|
|
||
3 years ago
|
<logger name="cn.hippo4j.server.listener.StartingApplicationListener">
|
||
|
<appender-ref ref="CONSOLE"/>
|
||
|
<level value="INFO"/>
|
||
|
</logger>
|
||
|
|
||
3 years ago
|
<root level="${logLevel}">
|
||
2 years ago
|
<appender-ref ref="CONSOLE"/>
|
||
3 years ago
|
<appender-ref ref="FILE-ALL"/>
|
||
|
<appender-ref ref="FILE-ERROR"/>
|
||
3 years ago
|
</root>
|
||
|
</configuration>
|