Я использую Spring MVC Java в приложении, и журналы являются выводом приложения, размещенного на GCP. logback.xml
определяется в консуле. Я получаю дубликаты журналов на выходе приложения
[][]2020-02-09T19:14:43,675+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
[][]2020-02-09T19:14:43,675+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
10.0.27.1 - - [09/Feb/2020:19:14:43 +0700] "GET /mobile-api/sys-info/healthcheck HTTP/1.1" 200 83 0.092
[][]2020-02-09T19:14:53,668+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
[][]2020-02-09T19:14:53,668+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
10.0.27.1 - - [09/Feb/2020:19:14:53 +0700] "GET /mobile-api/sys-info/healthcheck HTTP/1.1" 200 83 0.083
[][]2020-02-09T19:15:03,656+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
[][]2020-02-09T19:15:03,656+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
10.0.27.1 - - [09/Feb/2020:19:15:03 +0700] "GET /mobile-api/sys-info/healthcheck HTTP/1.1" 200 83 0.088
[][]2020-02-09T19:15:13,661+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
[][]2020-02-09T19:15:13,661+07:00 WARN
c.g.s.b.s.spring.SessionInterceptor - Invalid session, let's create new session
Вот мой файл конфигурации: logback. xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration scanPeriod="1 minutes" scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%X{key}][%X{user}]%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", Asia/Jakarta} %-5level
%logger{35} - %replace(%msg){'\n', ' '}%nopex%n
</pattern>
</encoder>
</appender>
<root level="warn">
<appender-ref ref="STDOUT"/>
</root>
</configuration>