aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pnfsimulator
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-08-06 16:48:05 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-06 16:48:05 +0000
commita3f78f379a8a4be48ec01691405eb03bd3415cb1 (patch)
tree19ae0a9ee207e9f67692707838f58f742d940878 /test/mocks/pnfsimulator
parent6a7198e0cc460b0e9bf3b36c5b83da836a0cb1df (diff)
parentf316199569e3e62bba48ba89aa4a6998dd0909ea (diff)
Merge "add logback-test"
Diffstat (limited to 'test/mocks/pnfsimulator')
-rw-r--r--test/mocks/pnfsimulator/src/test/resources/logback-test.xml49
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>