2021-04-26 01:35:05 +08:00
|
|
|
|
<configuration>
|
|
|
|
|
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
|
|
|
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
2021-04-26 01:35:05 +08:00
|
|
|
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<pattern>%d{ISO8601} | %tid | %thread | %-5level | %msg%n</pattern>
|
|
|
|
|
</layout>
|
|
|
|
|
</encoder>
|
|
|
|
|
</appender>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
|
|
<FileNamePattern>./logs/ruoyi-vue-pro-%d{yyyy-MM-dd_HH}.log</FileNamePattern>
|
|
|
|
|
<MaxHistory>3</MaxHistory>
|
|
|
|
|
</rollingPolicy>
|
|
|
|
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
|
|
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
|
|
|
<pattern>%d{ISO8601} | %tid | %thread | %-5level | %msg%n</pattern>
|
|
|
|
|
</layout>
|
|
|
|
|
</encoder>
|
|
|
|
|
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
|
|
|
|
<MaxFileSize>10MB</MaxFileSize>
|
|
|
|
|
</triggeringPolicy>
|
|
|
|
|
</appender>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
|
|
|
|
|
<discardingThreshold>0</discardingThreshold>
|
|
|
|
|
<queueSize>10</queueSize>
|
|
|
|
|
<appender-ref ref="FILE"/>
|
|
|
|
|
</appender>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
|
2021-04-09 20:32:45 +08:00
|
|
|
|
<!-- skywalking grpc 日志收集 8.4.0版本开始支持 -->
|
|
|
|
|
<appender name="GRPC" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
2021-04-26 01:35:05 +08:00
|
|
|
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
|
|
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
|
|
|
|
|
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern>
|
|
|
|
|
</layout>
|
|
|
|
|
</encoder>s
|
2021-04-09 20:32:45 +08:00
|
|
|
|
</appender>
|
2021-03-06 02:03:53 +08:00
|
|
|
|
|
|
|
|
|
<springProfile name="dev">
|
|
|
|
|
<logger name="cn.iocoder.dashboard" level="INFO" additivity="false">
|
|
|
|
|
<appender-ref ref="STDOUT"/>
|
|
|
|
|
<appender-ref ref="ASYNC"/>
|
|
|
|
|
</logger>
|
|
|
|
|
</springProfile>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<springProfile name="local">
|
|
|
|
|
<logger name="cn.iocoder.dashboard" level="INFO" additivity="false">
|
|
|
|
|
<appender-ref ref="STDOUT"/>
|
2021-04-09 20:32:45 +08:00
|
|
|
|
<appender-ref ref="GRPC"/>
|
2021-03-06 02:03:53 +08:00
|
|
|
|
</logger>
|
|
|
|
|
</springProfile>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<springProfile name="default">
|
|
|
|
|
<logger name="cn.iocoder.dashboard" level="INFO" additivity="false">
|
|
|
|
|
<appender-ref ref="STDOUT"/>
|
|
|
|
|
<appender-ref ref="ASYNC"/>
|
|
|
|
|
</logger>
|
|
|
|
|
</springProfile>
|
|
|
|
|
|
2021-04-26 01:35:05 +08:00
|
|
|
|
<root level="INFO">
|
2021-03-06 02:03:53 +08:00
|
|
|
|
<appender-ref ref="STDOUT"/>
|
|
|
|
|
<appender-ref ref="ASYNC"/>
|
|
|
|
|
</root>
|
|
|
|
|
|
|
|
|
|
<logger name="cn.iocoder.dashboard" level="INFO">
|
|
|
|
|
<appender-ref ref="STDOUT"/>
|
|
|
|
|
</logger>
|
2021-04-26 01:35:05 +08:00
|
|
|
|
</configuration>
|