aboutsummaryrefslogtreecommitdiffstats
path: root/snmpmapper/src/main/resources/logback.xml
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2018-09-27 20:21:56 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-27 20:21:56 +0000
commit98f7f547a1b29b0a5d20872ebc8339da6ac6e4ed (patch)
tree6c44e65ea87d4996dbe1c879e752f4862879724e /snmpmapper/src/main/resources/logback.xml
parent417c0ab02b909f19cea5fa947a10c2089789d363 (diff)
parent7f9114df5c5ea043906f05df6fd5734955d8685a (diff)
Merge "Config from docker env params"
Diffstat (limited to 'snmpmapper/src/main/resources/logback.xml')
-rw-r--r--snmpmapper/src/main/resources/logback.xml79
1 files changed, 79 insertions, 0 deletions
diff --git a/snmpmapper/src/main/resources/logback.xml b/snmpmapper/src/main/resources/logback.xml
new file mode 100644
index 0000000..e979ca2
--- /dev/null
+++ b/snmpmapper/src/main/resources/logback.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <property name="DEV_HOME" value="logs" />
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
+ </Pattern>
+ </layout>
+ </appender>
+
+ <appender name="FILE-AUDIT"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${DEV_HOME}/debug.log</file>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
+ </Pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!-- rollover daily -->
+ <fileNamePattern>${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log
+ </fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>10MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+
+ </appender>
+
+ <appender name="FILE-ERROR"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>ERROR</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <file>${DEV_HOME}/error.log</file>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n
+ </Pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!-- rollover daily -->
+ <fileNamePattern>${DEV_HOME}/archived/error.%d{yyyy-MM-dd}.%i.log
+ </fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>10MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+
+ </appender>
+
+ <!-- Send logs to both console and file audit -->
+ <logger name="org.onap.dcaegen2.services.mapper.snmpmapper" level="debug" additivity="false">
+ <appender-ref ref="FILE-AUDIT" />
+ <appender-ref ref="STDOUT" />
+ </logger>
+ <logger name="org.onap.dcaegen2.services.mapper.snmpmapper" level="debug" additivity="false">
+ <appender-ref ref="FILE-AUDIT" />
+ <appender-ref ref="FILE-ERROR" />
+ <appender-ref ref="STDOUT" />
+ </logger> -
+ <!-- <logger name="org.onap.universalvesadapter.adapter" level="error" additivity="false">
+ <appender-ref ref="FILE-ERROR" />
+ </logger> -->
+
+
+
+
+
+</configuration> \ No newline at end of file