Fix logstash (#34)

This commit is contained in:
Kostya 2021-05-18 16:23:29 +03:00 committed by GitHub
parent d5c88c8ae2
commit b6f72cc87b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 4 deletions

1
.gitignore vendored
View File

@ -76,3 +76,4 @@ fabric.properties
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
env.list
/test.log

View File

@ -31,18 +31,20 @@
<db.user>postgres</db.user>
<db.password>postgres</db.password>
<db.schema>cm</db.schema>
<shared.resources.version>0.3.8</shared.resources.version>
<kafka.common.lib.version>0.1.7</kafka.common.lib.version>
<geck.version>0.6.11</geck.version>
<testcontainers.version>1.14.3</testcontainers.version>
<shared.resources.version>0.3.8</shared.resources.version>
</properties>
<dependencies>
<!--rbkmoney-->
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>shared-resources</artifactId>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>custom-metrics-spring-boot-starter</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
@ -134,7 +136,6 @@
<dependency>
<groupId>com.rbkmoney.geck</groupId>
<artifactId>serializer</artifactId>
<version>${geck.version}</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -3,6 +3,43 @@
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>test.log</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/>
<message/>
<version/>
<loggerName/>
<context/>
<pattern>
<pattern>
{
"@timestamp": "%date{yyy-MM-dd'T'HH:mm:ss.SSSXXX, UTC}",
"@severity": "%level",
"application": "{{ service_name }}"
}
</pattern>
</pattern>
<stackTrace>
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<shortenedClassNameLength>20</shortenedClassNameLength>
<rootCauseFirst>true</rootCauseFirst>
</throwableConverter>
</stackTrace>
</providers>
</encoder>
</appender>
<root level="warn">
<appender-ref ref="FILE"/>
</root>
<root level="warn">
<appender-ref ref="CONSOLE"/>
</root>