blob: 036447d6350f4a7c23fa9873b5bb1a3c2d414b02 [file] [log] [blame]
arjunek1992f6353d42018-11-20 08:56:29 -05001################################################################################
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
21color.fatal = bright red
22color.error = bright red
23color.warn = bright yellow
24color.info = bright green
25color.debug = cyan
26color.trace = cyan
27
28# Common pattern layout for appenders
29log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
Carmelo Casconedc971922019-04-22 14:45:09 -070030log4j2.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[%c{1}]\u001b[0m %msg%n%throwable
arjunek1992f6353d42018-11-20 08:56:29 -050031
32
33# Root logger
34log4j2.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
38log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
39log4j2.rootLogger.appenderRef.AuditFile.ref = AuditFile
40log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
41log4j2.rootLogger.appenderRef.Console.ref = Console
42log4j2.rootLogger.appenderRef.Console.filter.regex.type = RegexFilter
43log4j2.rootLogger.appenderRef.Console.filter.regex.regex = .*Audit.*
44log4j2.rootLogger.appenderRef.Console.filter.regex.onMatch = DENY
45log4j2.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
52log4j2.logger.sshd.name = org.apache.sshd
53log4j2.logger.sshd.level = INFO
54
55# Spifly logger
56log4j2.logger.spifly.name = org.apache.aries.spifly
57log4j2.logger.spifly.level = WARN
58
59# Security audit logger
60log4j2.logger.audit.name = audit
61log4j2.logger.audit.level = TRACE
62log4j2.logger.audit.additivity = false
63log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
64
Arjun E K53a20082018-12-18 05:13:05 -050065log4j2.logger.securityAudit.name = securityAudit
66log4j2.logger.securityAudit.level = TRACE
67log4j2.logger.securityAudit.additivity = false
68log4j2.logger.securityAudit.appenderRef.AuditRollingFile.ref = AuditRollingFile
69
70log4j2.logger.karafAudit.name = karafAudit
71log4j2.logger.karafAudit.level = TRACE
72log4j2.logger.karafAudit.additivity = false
73log4j2.logger.karafAudit.appenderRef.AuditRollingFile.ref = KarafRollingFile
74
arjunek1992f6353d42018-11-20 08:56:29 -050075# Appenders configuration
76
77# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
78log4j2.appender.console.type = Console
79log4j2.appender.console.name = Console
80log4j2.appender.console.layout.type = PatternLayout
81log4j2.appender.console.layout.pattern = ${log4j2.out.pattern}
82
arjunek1992f6353d42018-11-20 08:56:29 -050083# Rolling file appender
84log4j2.appender.rolling.type = RollingRandomAccessFile
85log4j2.appender.rolling.name = RollingFile
86log4j2.appender.rolling.filter.regex.type = RegexFilter
87log4j2.appender.rolling.filter.regex.regex = .*AuditLog.*
88log4j2.appender.rolling.filter.regex.onMatch = DENY
89log4j2.appender.rolling.filter.regex.onMisMatch = ACCEPT
90log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log
91log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i
92# uncomment to not force a disk flush
93#log4j2.appender.rolling.immediateFlush = false
94log4j2.appender.rolling.append = true
95log4j2.appender.rolling.layout.type = PatternLayout
96log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
97log4j2.appender.rolling.policies.type = Policies
98log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
99log4j2.appender.rolling.policies.size.size = 16MB
100
101# Audit file appender
102log4j2.appender.audit.type = RollingRandomAccessFile
103log4j2.appender.audit.name = AuditRollingFile
104log4j2.appender.audit.fileName = ${karaf.data}/log/security.log
105log4j2.appender.audit.filePattern = ${karaf.data}/log/security-%i.log
106log4j2.appender.audit.append = true
107log4j2.appender.audit.layout.type = PatternLayout
108log4j2.appender.audit.layout.pattern = %m%n
109log4j2.appender.audit.policies.type = Policies
110log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
111log4j2.appender.audit.policies.size.size = 8MB
112
Arjun E K53a20082018-12-18 05:13:05 -0500113log4j2.appender.securityAudit.type = RollingRandomAccessFile
114log4j2.appender.securityAudit.name = AuditRollingFile
115log4j2.appender.securityAudit.fileName = ${karaf.data}/log/audit.log
116log4j2.appender.securityAudit.filePattern = ${karaf.data}/log/audit-%i.log
117log4j2.appender.securityAudit.append = true
118log4j2.appender.securityAudit.layout.type = PatternLayout
119log4j2.appender.securityAudit.layout.pattern = ${log4j2.pattern}
120log4j2.appender.securityAudit.policies.type = Policies
121log4j2.appender.securityAudit.policies.size.type = SizeBasedTriggeringPolicy
122log4j2.appender.securityAudit.policies.size.size = 8MB
123
124log4j2.appender.karafAudit.type = RollingRandomAccessFile
125log4j2.appender.karafAudit.name = KarafRollingFile
126log4j2.appender.karafAudit.fileName = ${karaf.data}/log/karaf.log
127log4j2.appender.karafAudit.filePattern = ${karaf.data}/log/karaf-%i.log
128log4j2.appender.karafAudit.append = true
129log4j2.appender.karafAudit.layout.type = PatternLayout
130log4j2.appender.karafAudit.layout.pattern = ${log4j2.pattern}
131log4j2.appender.karafAudit.policies.type = Policies
132log4j2.appender.karafAudit.policies.size.type = SizeBasedTriggeringPolicy
133log4j2.appender.karafAudit.policies.size.size = 8MB
134
arjunek1992f6353d42018-11-20 08:56:29 -0500135# OSGi appender
136log4j2.appender.osgi.type = PaxOsgi
137log4j2.appender.osgi.name = PaxOsgi
138log4j2.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