mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | # Copyright © 2017 Amdocs, Bell Canada, AT&T |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | <configuration debug="true" scan="true" scanPeriod="3 seconds"> |
| 19 | <!--<jmxConfigurator /> --> |
| 20 | <!-- specify the base path of the log directory --> |
| 21 | <property name="logDir" value="/var/log/onap" /> |
| 22 | <!-- specify the component name --> |
| 23 | <property name="componentName" value="policy" /> |
| 24 | <!-- specify the sub component name --> |
| 25 | <property name="subComponentName" value="xacml-pap-rest" /> |
| 26 | <!-- The directories where logs are written --> |
| 27 | <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" /> |
| 28 | <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" /> |
| 29 | <!-- log file names --> |
| 30 | <property name="errorLogName" value="error" /> |
| 31 | <property name="metricsLogName" value="metrics" /> |
| 32 | <property name="auditLogName" value="audit" /> |
| 33 | <property name="debugLogName" value="debug" /> |
| 34 | <property name="queueSize" value="256" /> |
| 35 | <property name="maxFileSize" value="50MB" /> |
| 36 | <property name="maxHistory" value="30" /> |
| 37 | <property name="totalSizeCap" value="10GB" /> |
| 38 | <!-- Example evaluator filter applied against console appender --> |
| 39 | <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT"> |
| 40 | <encoder> |
| 41 | <pattern>${pattern}</pattern> |
| 42 | </encoder> |
| 43 | </appender> |
| 44 | <!-- ============================================================================ --> |
| 45 | <!-- EELF Appenders --> |
| 46 | <!-- ============================================================================ --> |
| 47 | <!-- The EELFAppender is used to record events to the general application |
| 48 | log --> |
| 49 | <!-- EELF Audit Appender. This appender is used to record audit engine |
| 50 | related logging events. The audit logger and appender are specializations |
| 51 | of the EELF application root logger and appender. This can be used to segregate |
| 52 | Policy engine events from other components, or it can be eliminated to record |
| 53 | these events as part of the application root log. --> |
| 54 | <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="EELFAudit"> |
| 55 | <file>${logDirectory}/${auditLogName}.log</file> |
| 56 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 57 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| 58 | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| 59 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 60 | </timeBasedFileNamingAndTriggeringPolicy> |
| 61 | <maxHistory>${maxHistory}</maxHistory> |
| 62 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 63 | </rollingPolicy> |
| 64 | <encoder> |
| 65 | <pattern>${pattern}</pattern> |
| 66 | </encoder> |
| 67 | </appender> |
| 68 | <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncEELFAudit"> |
| 69 | <queueSize>${queueSize}</queueSize> |
| 70 | <appender-ref ref="EELFAudit" /> |
| 71 | </appender> |
| 72 | <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="EELFMetrics"> |
| 73 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 74 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 75 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| 76 | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| 77 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 78 | </timeBasedFileNamingAndTriggeringPolicy> |
| 79 | <maxHistory>${maxHistory}</maxHistory> |
| 80 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 81 | </rollingPolicy> |
| 82 | <encoder> |
| 83 | <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - |
| 84 | %msg%n"</pattern> --> |
| 85 | <pattern>${pattern}</pattern> |
| 86 | </encoder> |
| 87 | </appender> |
| 88 | <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncEELFMetrics"> |
| 89 | <queueSize>${queueSize}</queueSize> |
| 90 | <appender-ref ref="EELFMetrics" /> |
| 91 | </appender> |
| 92 | <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="EELFError"> |
| 93 | <file>${logDirectory}/${errorLogName}.log</file> |
| 94 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 95 | <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| 96 | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| 97 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 98 | </timeBasedFileNamingAndTriggeringPolicy> |
| 99 | <maxHistory>${maxHistory}</maxHistory> |
| 100 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 101 | </rollingPolicy> |
| 102 | <encoder> |
| 103 | <pattern>${pattern}</pattern> |
| 104 | </encoder> |
| 105 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 106 | <level>INFO</level> |
| 107 | </filter> |
| 108 | </appender> |
| 109 | <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncEELFError"> |
| 110 | <queueSize>${queueSize}</queueSize> |
| 111 | <appender-ref ref="EELFError" /> |
| 112 | </appender> |
| 113 | <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="EELFDebug"> |
| 114 | <file>${logDirectory}/${debugLogName}.log</file> |
| 115 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 116 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| 117 | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| 118 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 119 | </timeBasedFileNamingAndTriggeringPolicy> |
| 120 | <maxHistory>${maxHistory}</maxHistory> |
| 121 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 122 | </rollingPolicy> |
| 123 | <encoder> |
| 124 | <pattern>${pattern}</pattern> |
| 125 | </encoder> |
| 126 | </appender> |
| 127 | <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncEELFDebug"> |
| 128 | <queueSize>${queueSize}</queueSize> |
| 129 | <appender-ref ref="EELFDebug" /> |
| 130 | <includeCallerData>true</includeCallerData> |
| 131 | </appender> |
| 132 | <!-- ============================================================================ --> |
| 133 | <!-- EELF loggers --> |
| 134 | <!-- ============================================================================ --> |
| 135 | <logger additivity="false" level="info" name="com.att.eelf.audit"> |
| 136 | <appender-ref ref="asyncEELFAudit" /> |
| 137 | </logger> |
| 138 | <logger additivity="false" level="info" name="com.att.eelf.metrics"> |
| 139 | <appender-ref ref="asyncEELFMetrics" /> |
| 140 | </logger> |
| 141 | <logger additivity="false" level="info" name="com.att.eelf.error"> |
| 142 | <appender-ref ref="asyncEELFError" /> |
| 143 | </logger> |
| 144 | <logger additivity="false" level="debug" name="com.att.eelf.debug"> |
| 145 | <appender-ref ref="asyncEELFDebug" /> |
| 146 | </logger> |
| 147 | <root level="INFO"> |
| 148 | <appender-ref ref="asyncEELFDebug" /> |
| 149 | </root> |
| 150 | </configuration> |