blob: 2b095d2d2e04fe7f1fef1339284f152b06b4a1f4 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
Zack Williams30c01f92017-02-19 23:38:52 -070019################################################################################
20#
21# Licensed to the Apache Software Foundation (ASF) under one or more
22# contributor license agreements. See the NOTICE file distributed with
23# this work for additional information regarding copyright ownership.
24# The ASF licenses this file to You under the Apache License, Version 2.0
25# (the "License"); you may not use this file except in compliance with
26# the License. You may obtain a copy of the License at
27#
28# http://www.apache.org/licenses/LICENSE-2.0
29#
30# Unless required by applicable law or agreed to in writing, software
31# distributed under the License is distributed on an "AS IS" BASIS,
32# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33# See the License for the specific language governing permissions and
34# limitations under the License.
35#
36################################################################################
37
38# Root logger
Zack Williamsc989f262017-05-11 13:02:59 -070039log4j.rootLogger={{ onos_log_level }}, out, logstash, osgi:*
Zack Williams30c01f92017-02-19 23:38:52 -070040log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
41
42# CONSOLE appender not used by default
43log4j.appender.stdout=org.apache.log4j.ConsoleAppender
44log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
45log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
46
47# logstash log4j appender
48log4j.appender.logstash=org.apache.log4j.net.SocketAppender
Zack Williams30c01f92017-02-19 23:38:52 -070049log4j.appender.logstash.Port={{ log4j_port }}
50log4j.appender.logstash.RemoteHost={{ logging_host }}
51log4j.appender.logstash.ReconnectionDelay=5000
52log4j.appender.logstash.Application=onoscord
53
54# File appender
55log4j.appender.out=org.apache.log4j.RollingFileAppender
56log4j.appender.out.layout=org.apache.log4j.PatternLayout
57log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
58log4j.appender.out.file=${karaf.data}/log/karaf.log
59log4j.appender.out.append=true
60log4j.appender.out.maxFileSize=10MB
61log4j.appender.out.maxBackupIndex=10
62
63# Sift appender
64log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
65log4j.appender.sift.key=bundle.name
66log4j.appender.sift.default=karaf
67log4j.appender.sift.appender=org.apache.log4j.FileAppender
68log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
69log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
70log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
71log4j.appender.sift.appender.append=true
72