Till Westmann | ea8ab39 | 2013-06-05 15:17:08 -0700 | [diff] [blame] | 1 | #/* |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame] | 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with 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, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
buyingyi | c1df196 | 2012-04-25 21:37:23 +0000 | [diff] [blame] | 18 | # Define some default values that can be overridden by system properties |
| 19 | hadoop.root.logger=FATAL,console |
| 20 | hadoop.log.dir=. |
| 21 | hadoop.log.file=hadoop.log |
| 22 | |
| 23 | # Define the root logger to the system property "hadoop.root.logger". |
| 24 | log4j.rootLogger=${hadoop.root.logger}, EventCounter |
| 25 | |
| 26 | # Logging Threshold |
| 27 | log4j.threshhold=FATAL |
| 28 | |
| 29 | # |
| 30 | # Daily Rolling File Appender |
| 31 | # |
| 32 | |
| 33 | log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender |
| 34 | log4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file} |
| 35 | |
| 36 | # Rollver at midnight |
| 37 | log4j.appender.DRFA.DatePattern=.yyyy-MM-dd |
| 38 | |
| 39 | # 30-day backup |
| 40 | #log4j.appender.DRFA.MaxBackupIndex=30 |
| 41 | log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout |
| 42 | |
| 43 | # Pattern format: Date LogLevel LoggerName LogMessage |
| 44 | log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n |
| 45 | # Debugging Pattern format |
| 46 | #log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n |
| 47 | |
| 48 | |
| 49 | # |
| 50 | # console |
| 51 | # Add "console" to rootlogger above if you want to use this |
| 52 | # |
| 53 | |
| 54 | log4j.appender.console=org.apache.log4j.ConsoleAppender |
| 55 | log4j.appender.console.target=System.err |
| 56 | log4j.appender.console.layout=org.apache.log4j.PatternLayout |
| 57 | log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n |
| 58 | |
| 59 | # |
| 60 | # TaskLog Appender |
| 61 | # |
| 62 | |
| 63 | #Default values |
| 64 | hadoop.tasklog.taskid=null |
| 65 | hadoop.tasklog.noKeepSplits=4 |
| 66 | hadoop.tasklog.totalLogFileSize=100 |
| 67 | hadoop.tasklog.purgeLogSplits=true |
| 68 | hadoop.tasklog.logsRetainHours=12 |
| 69 | |
| 70 | log4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender |
| 71 | log4j.appender.TLA.taskId=${hadoop.tasklog.taskid} |
| 72 | log4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize} |
| 73 | |
| 74 | log4j.appender.TLA.layout=org.apache.log4j.PatternLayout |
| 75 | log4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n |
| 76 | |
| 77 | # |
| 78 | # Rolling File Appender |
| 79 | # |
| 80 | |
| 81 | #log4j.appender.RFA=org.apache.log4j.RollingFileAppender |
| 82 | #log4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file} |
| 83 | |
| 84 | # Logfile size and and 30-day backups |
| 85 | #log4j.appender.RFA.MaxFileSize=1MB |
| 86 | #log4j.appender.RFA.MaxBackupIndex=30 |
| 87 | |
| 88 | #log4j.appender.RFA.layout=org.apache.log4j.PatternLayout |
| 89 | #log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n |
| 90 | #log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n |
| 91 | |
| 92 | # |
| 93 | # FSNamesystem Audit logging |
| 94 | # All audit events are logged at INFO level |
| 95 | # |
| 96 | log4j.logger.org.apache.hadoop.fs.FSNamesystem.audit=WARN |
| 97 | |
| 98 | # Custom Logging levels |
| 99 | |
| 100 | #log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG |
| 101 | #log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG |
| 102 | #log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG |
| 103 | |
| 104 | # Jets3t library |
| 105 | log4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR |
| 106 | |
| 107 | # |
| 108 | # Event Counter Appender |
| 109 | # Sends counts of logging messages at different severity levels to Hadoop Metrics. |
| 110 | # |
| 111 | log4j.appender.EventCounter=org.apache.hadoop.metrics.jvm.EventCounter |