Itay Hassid | e2da86d | 2017-08-24 12:54:42 +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 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [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} | %m%n |
| 22 | |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 23 | # Root logger |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 24 | log4j2.rootLogger.level = INFO |
| 25 | # uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library |
| 26 | #log4j2.rootLogger.type = asyncRoot |
| 27 | #log4j2.rootLogger.includeLocation = false |
| 28 | log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile |
| 29 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi |
| 30 | log4j2.rootLogger.appenderRef.Console.ref = Console |
| 31 | log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter |
| 32 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 33 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 34 | # Loggers configuration |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 35 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 36 | # Spifly logger |
| 37 | log4j2.logger.spifly.name = org.apache.aries.spifly |
| 38 | log4j2.logger.spifly.level = WARN |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 39 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 40 | # Security audit logger |
| 41 | log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit |
| 42 | log4j2.logger.audit.level = INFO |
| 43 | log4j2.logger.audit.additivity = false |
| 44 | log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 45 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 46 | # Appenders configuration |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 47 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 48 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) |
| 49 | log4j2.appender.console.type = Console |
| 50 | log4j2.appender.console.name = Console |
| 51 | log4j2.appender.console.layout.type = PatternLayout |
| 52 | log4j2.appender.console.layout.pattern = ${log4j2.pattern} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 53 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 54 | # Rolling file appender |
| 55 | log4j2.appender.rolling.type = RollingRandomAccessFile |
| 56 | log4j2.appender.rolling.name = RollingFile |
| 57 | log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log |
| 58 | log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i |
| 59 | # uncomment to not force a disk flush |
| 60 | #log4j2.appender.rolling.immediateFlush = false |
| 61 | log4j2.appender.rolling.append = true |
| 62 | log4j2.appender.rolling.layout.type = PatternLayout |
| 63 | log4j2.appender.rolling.layout.pattern = ${log4j2.pattern} |
| 64 | log4j2.appender.rolling.policies.type = Policies |
| 65 | log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy |
| 66 | log4j2.appender.rolling.policies.size.size = 16MB |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 67 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 68 | # Audit file appender |
| 69 | log4j2.appender.audit.type = RollingRandomAccessFile |
| 70 | log4j2.appender.audit.name = AuditRollingFile |
| 71 | log4j2.appender.audit.fileName = ${karaf.data}/security/audit.log |
| 72 | log4j2.appender.audit.filePattern = ${karaf.data}/security/audit.log.%i |
| 73 | log4j2.appender.audit.append = true |
| 74 | log4j2.appender.audit.layout.type = PatternLayout |
| 75 | log4j2.appender.audit.layout.pattern = ${log4j2.pattern} |
| 76 | log4j2.appender.audit.policies.type = Policies |
| 77 | log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy |
| 78 | log4j2.appender.audit.policies.size.size = 8MB |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 79 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 80 | # OSGi appender |
| 81 | log4j2.appender.osgi.type = PaxOsgi |
| 82 | log4j2.appender.osgi.name = PaxOsgi |
| 83 | log4j2.appender.osgi.filter = * |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 84 | |
Aaron Hay | 286a9f2 | 2018-10-08 17:54:36 -0400 | [diff] [blame] | 85 | # help with identification of maven-related problems with pax-url-aether |
| 86 | #log4j2.logger.aether.name = shaded.org.eclipse.aether |
| 87 | #log4j2.logger.aether.level = TRACE |
| 88 | #log4j2.logger.http-headers.name = shaded.org.apache.http.headers |
| 89 | #log4j2.logger.http-headers.level = DEBUG |
| 90 | #log4j2.logger.maven.name = org.ops4j.pax.url.mvn |
| 91 | #log4j2.logger.maven.level = TRACE |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 92 | |