blob: 6c45a4aad94f888d9a0b6138df2fd46ecc84a25b [file] [log] [blame]
rdudyalab086cf32016-08-11 00:07:45 -04001#
2# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18# From http://packages.ubuntu.com/saucy/zookeeperd
19
20# ZooKeeper Logging Configuration
21#
22
23# Format is "<default threshold> (, <appender>)+
24
25log4j.rootLogger=${zookeeper.root.logger}
26
27# Example: console appender only
28# log4j.rootLogger=INFO, CONSOLE
29
30# Example with rolling log file
31#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
32
33# Example with rolling log file and tracing
34#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
35
36#
37# Log INFO level and above messages to the console
38#
39log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
40log4j.appender.CONSOLE.Threshold=INFO
41log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
42log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
43
44#
45# Add ROLLINGFILE to rootLogger to get log file output
46# Log DEBUG level and above messages to a log file
47log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
48log4j.appender.ROLLINGFILE.Threshold=WARN
49log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/zookeeper.log
50
51# Max log file size of 10MB
52log4j.appender.ROLLINGFILE.MaxFileSize=10MB
53# uncomment the next line to limit number of backup files
54#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
55
56log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
57log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
58
59
60#
61# Add TRACEFILE to rootLogger to get log file output
62# Log DEBUG level and above messages to a log file
63log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
64log4j.appender.TRACEFILE.Threshold=TRACE
65log4j.appender.TRACEFILE.File=${zookeeper.log.dir}/zookeeper_trace.log
66
67log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
68### Notice we are including log4j's NDC here (%x)
69log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n