diff options
author | micdzied <michal.1.dziedzic@nokia.com> | 2018-08-06 09:28:01 +0200 |
---|---|---|
committer | micdzied <michal.1.dziedzic@nokia.com> | 2018-08-06 09:30:10 +0200 |
commit | f316199569e3e62bba48ba89aa4a6998dd0909ea (patch) | |
tree | d1ed9d9684daaf10c7c8341959baf14171961a6a /test | |
parent | cbce0a5fc41f4d168a0a8aa37a98fe3e22076c50 (diff) |
add logback-test
Change-Id: Ic9532236edce91d8f9b0283dd3acdf0fe8e7212f
Issue-ID: INT-607
Signed-off-by: micdzied <michal.1.dziedzic@nokia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/mocks/pnfsimulator/src/test/resources/logback-test.xml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/mocks/pnfsimulator/src/test/resources/logback-test.xml b/test/mocks/pnfsimulator/src/test/resources/logback-test.xml new file mode 100644 index 000000000..d7966fe60 --- /dev/null +++ b/test/mocks/pnfsimulator/src/test/resources/logback-test.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration complete="true" compact="true"> + + <Property name="outputFilename" value="pnfsimulator_output"/> + <Property name="log-path" value="${java.io.tmpdir}"/> + <property name="maxFileSize" value="50MB"/> + <property name="maxHistory" value="30"/> + <property name="totalSizeCap" value="10GB"/> + + <appender name="Console" target="SYSTEM_OUT" class="ch.qos.logback.core.ConsoleAppender"> + <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> + </encoder> + </appender> + + <appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <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> + </encoder> + <File>${log-path}/${outputFilename}.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${log-path}/${outputFilename}.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern> + <MaxFileSize>${maxFileSize}</MaxFileSize> + <MaxHistory>${maxHistory}</MaxHistory> + <TotalSizeCap>${totalSizeCap}</TotalSizeCap> + </rollingPolicy> + </appender> + + <root level="info"> + <appender-ref ref="Console" /> + <appender-ref ref="ROLLING-FILE" /> + </root> +</Configuration> |