1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- ===============LICENSE_START=======================================================
3 Acumos ===================================================================================
4 Copyright (C) 2019 AT&T Intellectual Property & Tech Mahindra. All rights
5 reserved. ===================================================================================
6 This Acumos software file is distributed by AT&T and Tech Mahindra under
7 the Apache License, Version 2.0 (the "License"); you may not use this file
8 except in compliance with the License. You may obtain a copy of the License
9 at http://www.apache.org/licenses/LICENSE-2.0 This file is distributed on
10 an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 or implied. See the License for the specific language governing permissions
12 and limitations under the License. ===============LICENSE_END========================================================= -->
13 <configuration scan="true" scanPeriod="3 seconds" debug="false">
15 <!-- gather files in a subdirectory - usually a volume in docker -->
16 <property name="logDirPrefix" value="logs/platform-oam" />
18 <!-- component name is log file basename -->
19 <property name="componentName" value="elk-client"></property>
21 <!-- The directories where logs are written -->
22 <property name="logDirectory" value="${logDirPrefix}/${componentName}" />
24 <!-- Based on https://wiki.acumos.org/display/OAM/Acumos+Log+Standards -->
25 <property name="LogTimestamp"
26 value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}" />
27 <property name="Level" value="%.-5level" />
28 <property name="Logger" value="%logger" />
30 value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'}" />
31 <property name="Marker"
32 value="%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'}" />
33 <property name="Thread" value="%thread" />
34 <property name="Message"
35 value="%replace(%replace(%msg){'\t','\\\\t'}){'\n','\\\\n'}" />
36 <!-- Gather exception stack trace with no linebreaks -->
37 <property name="Exception"
38 value="%replace(%replace(%ex){'\t', '\\\\t'}){'\n','\\\\n'}" />
41 <!-- Use %nopexception to disable Logback default behavior of appending
44 <property name="singleLineBoreasPattern"
45 value="%nopexception${LogTimestamp}\t${Thread}\t${Level}\t${Logger}\t${Marker}\t${Mdc}\t${Message}\t${Exception}%n" />
46 <property name="multiLineBoreasPattern"
47 value="${LogTimestamp}\t${Thread}\t${Level}\t${Logger}\t${Marker}\t${Mdc}\t%msg\t%ex%n" />
49 <!-- Uncomment below code for filter if need to show events with level WARN
50 or above on the console (docker log) -->
51 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
52 <!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>WARN</level>
55 <pattern>${multiLineBoreasPattern}</pattern>
59 <!-- Show all events in the rolling log file -->
60 <appender name="file-rolling"
61 class="ch.qos.logback.core.rolling.RollingFileAppender">
62 <file>${logDirectory}/${componentName}.log</file>
63 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
64 <!-- daily rollover -->
65 <fileNamePattern>${logDirectory}/${componentName}.%d{yyyy-MM-dd}.log.zip
67 <!-- keep 30 days' worth of history capped at 3GB total size -->
68 <maxHistory>30</maxHistory>
69 <totalSizeCap>3GB</totalSizeCap>
72 <pattern>${singleLineBoreasPattern}</pattern>
75 <appender name="file-async" class="ch.qos.logback.classic.AsyncAppender">
76 <queueSize>256</queueSize>
77 <includeCallerData>true</includeCallerData>
78 <appender-ref ref="file-rolling" />
81 <!-- The root level is the default for all loggers, NOT a filter on any
82 appender. This level can be set with property logging.level.root=LEVEL. -->
84 <appender-ref ref="file-async" />
85 <appender-ref ref="STDOUT" />