jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | # contributor license agreements. See the NOTICE file distributed with |
| 5 | # this work for additional information regarding copyright ownership. |
| 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | # (the "License"); you may not use this file except in compliance with |
| 8 | # the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | ################################################################################ |
| 19 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 20 | # Common pattern layout for appenders |
| 21 | log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %X{currentGraph} - %X{nodeId} | %m%n |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 22 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 23 | |
| 24 | # Common properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 25 | maxFileSize=100MB |
| 26 | maxBackupIndex=20 |
| 27 | logDir=/var/log/onap |
| 28 | componentName=sdnc |
| 29 | logDirectory=${logDir}/${componentName} |
| 30 | karafLogName=karaf |
| 31 | errorLogName=error |
| 32 | metricsLogName=metrics |
| 33 | auditLogName=audit |
| 34 | debugLogName=debug |
| 35 | |
| 36 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 37 | # Root logger |
| 38 | log4j2.rootLogger.level = INFO |
| 39 | # uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library |
| 40 | #log4j2.rootLogger.type = asyncRoot |
| 41 | #log4j2.rootLogger.includeLocation = false |
| 42 | log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile |
| 43 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi |
| 44 | log4j2.rootLogger.appenderRef.Console.ref = Console |
| 45 | log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter |
| 46 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 47 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 48 | # Loggers configuration |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 49 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 50 | # Spifly logger |
| 51 | log4j2.logger.spifly.name = org.apache.aries.spifly |
| 52 | log4j2.logger.spifly.level = WARN |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 53 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 54 | # Security audit logger |
| 55 | log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit |
| 56 | log4j2.logger.audit.level = INFO |
| 57 | log4j2.logger.audit.additivity = false |
| 58 | log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 59 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 60 | # Appenders configuration |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 61 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 62 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) |
| 63 | log4j2.appender.console.type = Console |
| 64 | log4j2.appender.console.name = Console |
| 65 | log4j2.appender.console.layout.type = PatternLayout |
| 66 | log4j2.appender.console.layout.pattern = ${log4j2.pattern} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 67 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 68 | # Rolling file appender |
| 69 | log4j2.appender.rolling.type = RollingRandomAccessFile |
| 70 | log4j2.appender.rolling.name = RollingFile |
| 71 | log4j.appender.rolling.level = INFO |
| 72 | log4j2.appender.rolling.fileName = ${logDirectory}/${karafLogName}.log |
| 73 | log4j2.appender.rolling.filePattern = ${logDirectory}/${karafLogName}.log.%i |
| 74 | # uncomment to not force a disk flush |
| 75 | #log4j2.appender.rolling.immediateFlush = false |
| 76 | log4j2.appender.rolling.append = true |
| 77 | log4j2.appender.rolling.layout.type = PatternLayout |
| 78 | log4j2.appender.rolling.layout.pattern = ${log4j2.pattern} |
| 79 | log4j2.appender.rolling.policies.type = Policies |
| 80 | log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy |
| 81 | log4j2.appender.rolling.policies.size.size = ${maxFileSize} |
| 82 | |
| 83 | # Audit file appender - not currently used, so commented out |
| 84 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 85 | log4j2.appender.audit.name = AuditRollingFile |
| 86 | log4j2.appender.audit.fileName = ${logDirectory}/${auditLogName}.log |
| 87 | log4j2.appender.audit.filePattern = ${logDirectory}/${auditLogName}.log.%i |
| 88 | log4j2.appender.audit.append = true |
| 89 | log4j2.appender.audit.layout.type = PatternLayout |
| 90 | log4j2.appender.audit.layout.pattern = ${log4j2.pattern} |
| 91 | log4j2.appender.audit.policies.type = Policies |
| 92 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 93 | log4j2.appender.audit.policies.size.size = ${maxFileSize} |
| 94 | |
| 95 | # OSGi appender |
| 96 | log4j2.appender.osgi.type = PaxOsgi |
| 97 | log4j2.appender.osgi.name = PaxOsgi |
| 98 | log4j2.appender.osgi.filter = * |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 99 | |
| 100 | |
| 101 | #ECOMP Debug appender |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 102 | log4j2.appender.debug.type = RollingRandomAccessFile |
| 103 | log4j2.appender.debug.name = DebugRollingFile |
| 104 | log4j2.appender.debug.fileName = ${logDirectory}/${debugLogName}.log |
| 105 | log4j2.appender.debug.filePattern = ${logDirectory}/${debugLogName}.log.%i |
| 106 | log4j2.appender.debug.append = true |
| 107 | log4j2.appender.debug.layout.type = PatternLayout |
| 108 | log4j2.appender.debug.layout.pattern = ${log4j2.pattern} |
| 109 | log4j2.appender.debug.policies.type = Policies |
| 110 | log4j2.appender.debug.policies.size.type = SizeBasedTriggeringPolicy |
| 111 | log4j2.appender.debug.policies.size.size = ${maxFileSize} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 112 | |
| 113 | |
| 114 | #Error appender |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 115 | log4j2.appender.error.type = RollingRandomAccessFile |
| 116 | log4j2.appender.error.name = ErrorRollingFile |
| 117 | log4j2.appender.error.fileName = ${logDirectory}/${errorLogName}.log |
| 118 | log4j2.appender.error.filePattern = ${logDirectory}/${errorLogName}.log.%i |
| 119 | log4j2.appender.error.append = true |
| 120 | log4j2.appender.error.layout.type = PatternLayout |
| 121 | log4j2.appender.error.layout.pattern = ${log4j2.pattern} |
| 122 | log4j2.appender.error.policies.type = Policies |
| 123 | log4j2.appender.error.policies.size.type = SizeBasedTriggeringPolicy |
| 124 | log4j2.appender.error.policies.size.size = ${maxFileSize} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 125 | |
Timoney, Dan (dt5972) | a052218 | 2018-11-07 11:22:19 -0500 | [diff] [blame^] | 126 | #Metrics appender - not used so commented out |
| 127 | #log4j2.appender.metrics.type = RollingRandomAccessFile |
| 128 | #log4j2.appender.metrics.name = MetricsRollingFile |
| 129 | #log4j2.appender.metrics.fileName = ${logDirectory}/${metricsLogName}.log |
| 130 | #log4j2.appender.metrics.filePattern = ${logDirectory}/${metricsLogName}.log.%i |
| 131 | #log4j2.appender.metrics.append = true |
| 132 | #log4j2.appender.metrics.layout.type = PatternLayout |
| 133 | #log4j2.appender.metrics.layout.pattern = ${log4j2.pattern} |
| 134 | #log4j2.appender.metrics.policies.type = Policies |
| 135 | #log4j2.appender.metrics.policies.size.type = SizeBasedTriggeringPolicy |
| 136 | #log4j2.appender.metrics.policies.size.size = ${maxFileSize} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 137 | |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 138 | |