diff options
author | micdzied <michal.1.dziedzic@nokia.com> | 2018-09-06 14:01:14 +0200 |
---|---|---|
committer | micdzied <michal.1.dziedzic@nokia.com> | 2018-09-06 14:01:14 +0200 |
commit | 442609d3c9b498a22b8ac51e2e58f657ee7947ad (patch) | |
tree | 4fe6c471f4234389243ffa7bffd12aa227842d52 /prh-app-server/src | |
parent | fea7d735b49c4be0958c6531771cc2ee511db490 (diff) |
fix logback
Change-Id: I7592d7320fb42bb3e5b80dd398fb69d39e7adb50
Issue-ID: DCAEGEN2-758
Signed-off-by: micdzied <michal.1.dziedzic@nokia.com>
Diffstat (limited to 'prh-app-server/src')
-rw-r--r-- | prh-app-server/src/main/resources/logback-spring.xml | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/prh-app-server/src/main/resources/logback-spring.xml b/prh-app-server/src/main/resources/logback-spring.xml index 427373fd..0906836c 100644 --- a/prh-app-server/src/main/resources/logback-spring.xml +++ b/prh-app-server/src/main/resources/logback-spring.xml @@ -10,34 +10,26 @@ <property name="maxFileSize" value="50MB"/> <property name="maxHistory" value="30"/> <property name="totalSizeCap" value="10GB"/> + <property name="defaultPattern" value="%nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n"/> <springProfile name="dev"> <appender class="ch.qos.logback.core.ConsoleAppender" name="CONSOLE" target="SYSTEM_OUT"> - <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> - <Pattern>%nopexception%logger - |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} - |%level - |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} - |%thread - |%n - </Pattern> + <encoder> + <pattern>${defaultPattern}</pattern> </encoder> </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ROLLING-FILE"> <encoder> - <pattern>%nopexception%logger - |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} - |%level - |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} - |%thread - |%n - </pattern> + <pattern>${defaultPattern}</pattern> </encoder> <file>${LOG_FILE}</file> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> @@ -56,16 +48,7 @@ <springProfile name="prod"> <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ROLLING-FILE"> <encoder> - <pattern>%nopexception%logger - |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} - |%level - |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} - |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} - |%thread - |%n - </pattern> + <pattern>${defaultPattern}</pattern> </encoder> <File>${log-path}/${outputFilename}.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |