blob: 0bbdbb7dcd9d2db82335d768d561109f67395ed8 [file] [log] [blame]
Itay Hasside2da86d2017-08-24 12:54:42 +00001################################################################################
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 Hay286a9f22018-10-08 17:54:36 -040020# Common pattern layout for appenders
21log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
22
Itay Hasside2da86d2017-08-24 12:54:42 +000023# Root logger
Aaron Hay286a9f22018-10-08 17:54:36 -040024log4j2.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
28log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
29log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
30log4j2.rootLogger.appenderRef.Console.ref = Console
31log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
32log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF}
Itay Hasside2da86d2017-08-24 12:54:42 +000033
Aaron Hay286a9f22018-10-08 17:54:36 -040034# Loggers configuration
Itay Hasside2da86d2017-08-24 12:54:42 +000035
Aaron Hay286a9f22018-10-08 17:54:36 -040036# Spifly logger
37log4j2.logger.spifly.name = org.apache.aries.spifly
38log4j2.logger.spifly.level = WARN
Itay Hasside2da86d2017-08-24 12:54:42 +000039
Aaron Hay286a9f22018-10-08 17:54:36 -040040# Security audit logger
41log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
42log4j2.logger.audit.level = INFO
43log4j2.logger.audit.additivity = false
44log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
Itay Hasside2da86d2017-08-24 12:54:42 +000045
Aaron Hay286a9f22018-10-08 17:54:36 -040046# Appenders configuration
Itay Hasside2da86d2017-08-24 12:54:42 +000047
Aaron Hay286a9f22018-10-08 17:54:36 -040048# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
49log4j2.appender.console.type = Console
50log4j2.appender.console.name = Console
51log4j2.appender.console.layout.type = PatternLayout
52log4j2.appender.console.layout.pattern = ${log4j2.pattern}
Itay Hasside2da86d2017-08-24 12:54:42 +000053
Aaron Hay286a9f22018-10-08 17:54:36 -040054# Rolling file appender
55log4j2.appender.rolling.type = RollingRandomAccessFile
56log4j2.appender.rolling.name = RollingFile
57log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log
58log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i
59# uncomment to not force a disk flush
60#log4j2.appender.rolling.immediateFlush = false
61log4j2.appender.rolling.append = true
62log4j2.appender.rolling.layout.type = PatternLayout
63log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
64log4j2.appender.rolling.policies.type = Policies
65log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
66log4j2.appender.rolling.policies.size.size = 16MB
Itay Hasside2da86d2017-08-24 12:54:42 +000067
Aaron Hay286a9f22018-10-08 17:54:36 -040068# Audit file appender
69log4j2.appender.audit.type = RollingRandomAccessFile
70log4j2.appender.audit.name = AuditRollingFile
71log4j2.appender.audit.fileName = ${karaf.data}/security/audit.log
72log4j2.appender.audit.filePattern = ${karaf.data}/security/audit.log.%i
73log4j2.appender.audit.append = true
74log4j2.appender.audit.layout.type = PatternLayout
75log4j2.appender.audit.layout.pattern = ${log4j2.pattern}
76log4j2.appender.audit.policies.type = Policies
77log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
78log4j2.appender.audit.policies.size.size = 8MB
Itay Hasside2da86d2017-08-24 12:54:42 +000079
Aaron Hay286a9f22018-10-08 17:54:36 -040080# OSGi appender
81log4j2.appender.osgi.type = PaxOsgi
82log4j2.appender.osgi.name = PaxOsgi
83log4j2.appender.osgi.filter = *
Itay Hasside2da86d2017-08-24 12:54:42 +000084
Aaron Hay286a9f22018-10-08 17:54:36 -040085# 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 Hasside2da86d2017-08-24 12:54:42 +000092