arjunek1992 | f6353d4 | 2018-11-20 08:56:29 -0500 | [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 | |
| 20 | # Colors for log level rendering |
| 21 | color.fatal = bright red |
| 22 | color.error = bright red |
| 23 | color.warn = bright yellow |
| 24 | color.info = bright green |
| 25 | color.debug = cyan |
| 26 | color.trace = cyan |
| 27 | |
| 28 | # Common pattern layout for appenders |
| 29 | log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n |
| 30 | log4j2.out.pattern = \u001b[90m%d{HH:mm:ss\.SSS}\u001b[0m %highlight{%-5level}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %msg%n%throwable |
| 31 | |
| 32 | |
| 33 | # Root logger |
| 34 | log4j2.rootLogger.level = INFO |
| 35 | # uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library |
| 36 | #log4j2.rootLogger.type = asyncRoot |
| 37 | #log4j2.rootLogger.includeLocation = false |
| 38 | log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile |
| 39 | log4j2.rootLogger.appenderRef.AuditFile.ref = AuditFile |
| 40 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi |
| 41 | log4j2.rootLogger.appenderRef.Console.ref = Console |
| 42 | log4j2.rootLogger.appenderRef.Console.filter.regex.type = RegexFilter |
| 43 | log4j2.rootLogger.appenderRef.Console.filter.regex.regex = .*Audit.* |
| 44 | log4j2.rootLogger.appenderRef.Console.filter.regex.onMatch = DENY |
| 45 | log4j2.rootLogger.appenderRef.Console.filter.regex.onMisMatch = ACCEPT |
| 46 | #log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter |
| 47 | #log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} |
| 48 | |
| 49 | # Loggers configuration |
| 50 | |
| 51 | # SSHD logger |
| 52 | log4j2.logger.sshd.name = org.apache.sshd |
| 53 | log4j2.logger.sshd.level = INFO |
| 54 | |
| 55 | # Spifly logger |
| 56 | log4j2.logger.spifly.name = org.apache.aries.spifly |
| 57 | log4j2.logger.spifly.level = WARN |
| 58 | |
| 59 | # Security audit logger |
| 60 | log4j2.logger.audit.name = audit |
| 61 | log4j2.logger.audit.level = TRACE |
| 62 | log4j2.logger.audit.additivity = false |
| 63 | log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile |
| 64 | |
Arjun E K | 53a2008 | 2018-12-18 05:13:05 -0500 | [diff] [blame] | 65 | log4j2.logger.securityAudit.name = securityAudit |
| 66 | log4j2.logger.securityAudit.level = TRACE |
| 67 | log4j2.logger.securityAudit.additivity = false |
| 68 | log4j2.logger.securityAudit.appenderRef.AuditRollingFile.ref = AuditRollingFile |
| 69 | |
| 70 | log4j2.logger.karafAudit.name = karafAudit |
| 71 | log4j2.logger.karafAudit.level = TRACE |
| 72 | log4j2.logger.karafAudit.additivity = false |
| 73 | log4j2.logger.karafAudit.appenderRef.AuditRollingFile.ref = KarafRollingFile |
| 74 | |
arjunek1992 | f6353d4 | 2018-11-20 08:56:29 -0500 | [diff] [blame] | 75 | # Appenders configuration |
| 76 | |
| 77 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) |
| 78 | log4j2.appender.console.type = Console |
| 79 | log4j2.appender.console.name = Console |
| 80 | log4j2.appender.console.layout.type = PatternLayout |
| 81 | log4j2.appender.console.layout.pattern = ${log4j2.out.pattern} |
| 82 | |
arjunek1992 | f6353d4 | 2018-11-20 08:56:29 -0500 | [diff] [blame] | 83 | # Rolling file appender |
| 84 | log4j2.appender.rolling.type = RollingRandomAccessFile |
| 85 | log4j2.appender.rolling.name = RollingFile |
| 86 | log4j2.appender.rolling.filter.regex.type = RegexFilter |
| 87 | log4j2.appender.rolling.filter.regex.regex = .*AuditLog.* |
| 88 | log4j2.appender.rolling.filter.regex.onMatch = DENY |
| 89 | log4j2.appender.rolling.filter.regex.onMisMatch = ACCEPT |
| 90 | log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log |
| 91 | log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i |
| 92 | # uncomment to not force a disk flush |
| 93 | #log4j2.appender.rolling.immediateFlush = false |
| 94 | log4j2.appender.rolling.append = true |
| 95 | log4j2.appender.rolling.layout.type = PatternLayout |
| 96 | log4j2.appender.rolling.layout.pattern = ${log4j2.pattern} |
| 97 | log4j2.appender.rolling.policies.type = Policies |
| 98 | log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy |
| 99 | log4j2.appender.rolling.policies.size.size = 16MB |
| 100 | |
| 101 | # Audit file appender |
| 102 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 103 | log4j2.appender.audit.name = AuditRollingFile |
| 104 | log4j2.appender.audit.fileName = ${karaf.data}/log/security.log |
| 105 | log4j2.appender.audit.filePattern = ${karaf.data}/log/security-%i.log |
| 106 | log4j2.appender.audit.append = true |
| 107 | log4j2.appender.audit.layout.type = PatternLayout |
| 108 | log4j2.appender.audit.layout.pattern = %m%n |
| 109 | log4j2.appender.audit.policies.type = Policies |
| 110 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 111 | log4j2.appender.audit.policies.size.size = 8MB |
| 112 | |
Arjun E K | 53a2008 | 2018-12-18 05:13:05 -0500 | [diff] [blame] | 113 | log4j2.appender.securityAudit.type = RollingRandomAccessFile |
| 114 | log4j2.appender.securityAudit.name = AuditRollingFile |
| 115 | log4j2.appender.securityAudit.fileName = ${karaf.data}/log/audit.log |
| 116 | log4j2.appender.securityAudit.filePattern = ${karaf.data}/log/audit-%i.log |
| 117 | log4j2.appender.securityAudit.append = true |
| 118 | log4j2.appender.securityAudit.layout.type = PatternLayout |
| 119 | log4j2.appender.securityAudit.layout.pattern = ${log4j2.pattern} |
| 120 | log4j2.appender.securityAudit.policies.type = Policies |
| 121 | log4j2.appender.securityAudit.policies.size.type = SizeBasedTriggeringPolicy |
| 122 | log4j2.appender.securityAudit.policies.size.size = 8MB |
| 123 | |
| 124 | log4j2.appender.karafAudit.type = RollingRandomAccessFile |
| 125 | log4j2.appender.karafAudit.name = KarafRollingFile |
| 126 | log4j2.appender.karafAudit.fileName = ${karaf.data}/log/karaf.log |
| 127 | log4j2.appender.karafAudit.filePattern = ${karaf.data}/log/karaf-%i.log |
| 128 | log4j2.appender.karafAudit.append = true |
| 129 | log4j2.appender.karafAudit.layout.type = PatternLayout |
| 130 | log4j2.appender.karafAudit.layout.pattern = ${log4j2.pattern} |
| 131 | log4j2.appender.karafAudit.policies.type = Policies |
| 132 | log4j2.appender.karafAudit.policies.size.type = SizeBasedTriggeringPolicy |
| 133 | log4j2.appender.karafAudit.policies.size.size = 8MB |
| 134 | |
arjunek1992 | f6353d4 | 2018-11-20 08:56:29 -0500 | [diff] [blame] | 135 | # OSGi appender |
| 136 | log4j2.appender.osgi.type = PaxOsgi |
| 137 | log4j2.appender.osgi.name = PaxOsgi |
| 138 | log4j2.appender.osgi.filter = * |
| 139 | |
| 140 | # help with identification of maven-related problems with pax-url-aether |
| 141 | #log4j2.logger.aether.name = shaded.org.eclipse.aether |
| 142 | #log4j2.logger.aether.level = TRACE |
| 143 | #log4j2.logger.http-headers.name = shaded.org.apache.http.headers |
| 144 | #log4j2.logger.http-headers.level = DEBUG |
| 145 | #log4j2.logger.maven.name = org.ops4j.pax.url.mvn |
| 146 | #log4j2.logger.maven.level = TRACE |