Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | |
| 18 | |
Zack Williams | 30c01f9 | 2017-02-19 23:38:52 -0700 | [diff] [blame] | 19 | ################################################################################ |
| 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 Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 39 | log4j.rootLogger={{ onos_log_level }}, out, logstash, osgi:* |
Zack Williams | 30c01f9 | 2017-02-19 23:38:52 -0700 | [diff] [blame] | 40 | log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer |
| 41 | |
| 42 | # CONSOLE appender not used by default |
| 43 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender |
| 44 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout |
| 45 | log4j.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 |
| 48 | log4j.appender.logstash=org.apache.log4j.net.SocketAppender |
Zack Williams | 30c01f9 | 2017-02-19 23:38:52 -0700 | [diff] [blame] | 49 | log4j.appender.logstash.Port={{ log4j_port }} |
| 50 | log4j.appender.logstash.RemoteHost={{ logging_host }} |
| 51 | log4j.appender.logstash.ReconnectionDelay=5000 |
| 52 | log4j.appender.logstash.Application=onoscord |
| 53 | |
| 54 | # File appender |
| 55 | log4j.appender.out=org.apache.log4j.RollingFileAppender |
| 56 | log4j.appender.out.layout=org.apache.log4j.PatternLayout |
| 57 | log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n |
| 58 | log4j.appender.out.file=${karaf.data}/log/karaf.log |
| 59 | log4j.appender.out.append=true |
| 60 | log4j.appender.out.maxFileSize=10MB |
| 61 | log4j.appender.out.maxBackupIndex=10 |
| 62 | |
| 63 | # Sift appender |
| 64 | log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender |
| 65 | log4j.appender.sift.key=bundle.name |
| 66 | log4j.appender.sift.default=karaf |
| 67 | log4j.appender.sift.appender=org.apache.log4j.FileAppender |
| 68 | log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout |
| 69 | log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n |
| 70 | log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log |
| 71 | log4j.appender.sift.appender.append=true |
| 72 | |