blob: b74cc995fd72af51f6d7dab324e7ec8e6f7e9578 [file] [log] [blame]
Jakub Latusek647e2cf2020-10-21 13:27:09 +02001{{/*
Itay Hasside2da86d2017-08-24 12:54:42 +00002################################################################################
3#
Taka Cho4ee42262018-11-07 09:05:38 -05004# ============LICENSE_START=======================================================
5# ONAP : APPC
6# ================================================================================
7# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
8# ================================================================================
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
Itay Hasside2da86d2017-08-24 12:54:42 +000012#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
Taka Cho4ee42262018-11-07 09:05:38 -050015# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20# ============LICENSE_END=========================================================
Itay Hasside2da86d2017-08-24 12:54:42 +000021#
22################################################################################
Jakub Latusek647e2cf2020-10-21 13:27:09 +020023*/}}
Itay Hasside2da86d2017-08-24 12:54:42 +000024
Aaron Hay286a9f22018-10-08 17:54:36 -040025# Common pattern layout for appenders
26log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
27
Itay Hasside2da86d2017-08-24 12:54:42 +000028# Root logger
Aaron Hay286a9f22018-10-08 17:54:36 -040029log4j2.rootLogger.level = INFO
30# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
31#log4j2.rootLogger.type = asyncRoot
32#log4j2.rootLogger.includeLocation = false
33log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
34log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
35log4j2.rootLogger.appenderRef.Console.ref = Console
36log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
37log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF}
Itay Hasside2da86d2017-08-24 12:54:42 +000038
Aaron Hay286a9f22018-10-08 17:54:36 -040039# Loggers configuration
Itay Hasside2da86d2017-08-24 12:54:42 +000040
Aaron Hay286a9f22018-10-08 17:54:36 -040041# Spifly logger
42log4j2.logger.spifly.name = org.apache.aries.spifly
43log4j2.logger.spifly.level = WARN
Itay Hasside2da86d2017-08-24 12:54:42 +000044
Aaron Hay286a9f22018-10-08 17:54:36 -040045# Security audit logger
46log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
47log4j2.logger.audit.level = INFO
48log4j2.logger.audit.additivity = false
49log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
Itay Hasside2da86d2017-08-24 12:54:42 +000050
Aaron Hay286a9f22018-10-08 17:54:36 -040051# Appenders configuration
Itay Hasside2da86d2017-08-24 12:54:42 +000052
Aaron Hay286a9f22018-10-08 17:54:36 -040053# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
54log4j2.appender.console.type = Console
55log4j2.appender.console.name = Console
56log4j2.appender.console.layout.type = PatternLayout
57log4j2.appender.console.layout.pattern = ${log4j2.pattern}
Itay Hasside2da86d2017-08-24 12:54:42 +000058
Aaron Hay286a9f22018-10-08 17:54:36 -040059# Rolling file appender
60log4j2.appender.rolling.type = RollingRandomAccessFile
61log4j2.appender.rolling.name = RollingFile
62log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log
63log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i
64# uncomment to not force a disk flush
65#log4j2.appender.rolling.immediateFlush = false
66log4j2.appender.rolling.append = true
67log4j2.appender.rolling.layout.type = PatternLayout
68log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
69log4j2.appender.rolling.policies.type = Policies
70log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
71log4j2.appender.rolling.policies.size.size = 16MB
Itay Hasside2da86d2017-08-24 12:54:42 +000072
Aaron Hay286a9f22018-10-08 17:54:36 -040073# Audit file appender
74log4j2.appender.audit.type = RollingRandomAccessFile
75log4j2.appender.audit.name = AuditRollingFile
76log4j2.appender.audit.fileName = ${karaf.data}/security/audit.log
77log4j2.appender.audit.filePattern = ${karaf.data}/security/audit.log.%i
78log4j2.appender.audit.append = true
79log4j2.appender.audit.layout.type = PatternLayout
80log4j2.appender.audit.layout.pattern = ${log4j2.pattern}
81log4j2.appender.audit.policies.type = Policies
82log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
83log4j2.appender.audit.policies.size.size = 8MB
Itay Hasside2da86d2017-08-24 12:54:42 +000084
Aaron Hay286a9f22018-10-08 17:54:36 -040085# OSGi appender
86log4j2.appender.osgi.type = PaxOsgi
87log4j2.appender.osgi.name = PaxOsgi
88log4j2.appender.osgi.filter = *
Itay Hasside2da86d2017-08-24 12:54:42 +000089
Aaron Hay286a9f22018-10-08 17:54:36 -040090# help with identification of maven-related problems with pax-url-aether
91#log4j2.logger.aether.name = shaded.org.eclipse.aether
92#log4j2.logger.aether.level = TRACE
93#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
94#log4j2.logger.http-headers.level = DEBUG
95#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
96#log4j2.logger.maven.level = TRACE
Itay Hasside2da86d2017-08-24 12:54:42 +000097