mirror of
https://github.com/valitydev/elon.git
synced 2024-11-06 01:45:18 +00:00
d55f638d51
added custom provider for masking message in FileAppender
61 lines
2.4 KiB
XML
61 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<configuration>
|
|
|
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>${LOG_FILE}</file>
|
|
<rollingPolicy class="com.rbkmoney.log.appender.NoopRollingPolicy"/>
|
|
<triggeringPolicy class="com.rbkmoney.log.appender.RotationBasedTriggeringPolicy">
|
|
<checkCachePeriod>5000</checkCachePeriod>
|
|
</triggeringPolicy>
|
|
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
|
|
<providers>
|
|
<mdc/>
|
|
<threadName/>
|
|
<provider class="com.rbkmoney.logback.mask.PatternMaskingMessageJsonProvider">
|
|
<maskPattern>\b\d{6}(\d{2,9})\d{4}\b</maskPattern>
|
|
<maskPattern>(\b\d{3}\b)</maskPattern>
|
|
</provider>
|
|
<version/>
|
|
<loggerName/>
|
|
<context/>
|
|
<pattern>
|
|
<pattern>
|
|
{
|
|
"@timestamp": "%date{yyy-MM-dd'T'HH:mm:ss.SSSXXX, UTC}",
|
|
"@severity": "%level",
|
|
"application": "@artifactId@",
|
|
"application_version": "@version@"
|
|
}
|
|
</pattern>
|
|
</pattern>
|
|
<stackTrace>
|
|
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
|
|
<shortenedClassNameLength>20</shortenedClassNameLength>
|
|
<rootCauseFirst>true</rootCauseFirst>
|
|
</throwableConverter>
|
|
</stackTrace>
|
|
</providers>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
<layout class="com.rbkmoney.logback.mask.PatternMaskingLayout">
|
|
<maskPattern>\b\d{6}(\d{2,9})\d{4}\b</maskPattern>
|
|
<maskPattern>(\b\d{3}\b)</maskPattern>
|
|
<pattern>%-5p [%d{ISO8601,UTC}] [%thread] %c: %m%n%rootException</pattern>
|
|
</layout>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<root level="INFO">
|
|
<appender-ref ref="CONSOLE"/>
|
|
<appender-ref ref="FILE"/>
|
|
</root>
|
|
|
|
<logger name="com.rbkmoney" level="ALL"/>
|
|
|
|
<jmxConfigurator/>
|
|
</configuration>
|
|
|