# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Define some default values that can be overridden by system properties
hadoop.log.dir=.
hadoop.log.file=hadoop.log

# RootLogger - DailyRollingFileAppender
log4j.rootLogger=INFO,DRFA

# Logging Threshold
log4j.threshold=ALL

#special logging requirements for some commandline tools
log4j.logger.org.apache.nutch.crawl.CrawlDb=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.CrawlDbMerger=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.CrawlDbReader=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.Crawl=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.DeduplicationJob=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.Generator=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.Injector=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.LinkDb=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.LinkDbMerger=INFO,cmdstdout
log4j.logger.org.apache.nutch.crawl.LinkDbReader=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.Fetcher=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.FetcherItem=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.FetcherItemQueue=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.FetcherItemQueues=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.FetcherThread=INFO,cmdstdout
log4j.logger.org.apache.nutch.fetcher.QueueFeeder=INFO,cmdstdout
log4j.logger.org.apache.nutch.hostdb.UpdateHostDb=INFO,cmdstdout
log4j.logger.org.apache.nutch.hostdb.ReadHostDb=INFO,cmdstdout
log4j.logger.org.apache.nutch.indexer.IndexingFiltersChecker=INFO,cmdstdout
log4j.logger.org.apache.nutch.indexer.IndexingJob=INFO,cmdstdout
log4j.logger.org.apache.nutch.indexer.IndexerOutputFormat=INFO,cmdstdout
log4j.logger.org.apache.nutch.indexwriter.solr.SolrIndexWriter=INFO,cmdstdout
log4j.logger.org.apache.nutch.indexwriter.solr.SolrUtils=INFO,cmdstdout
log4j.logger.org.apache.nutch.exchange.Exchanges=INFO,cmdstdout
log4j.logger.org.apache.nutch.parse.ParserChecker=INFO,cmdstdout
log4j.logger.org.apache.nutch.parse.ParseSegment=INFO,cmdstdout
log4j.logger.org.apache.nutch.plugin.PluginRepository=WARN
log4j.logger.org.apache.nutch.protocol.RobotRulesParser=INFO,cmdstdout
log4j.logger.org.apache.nutch.scoring.webgraph.LinkRank=INFO,cmdstdout
log4j.logger.org.apache.nutch.scoring.webgraph.Loops=INFO,cmdstdout
log4j.logger.org.apache.nutch.scoring.webgraph.ScoreUpdater=INFO,cmdstdout
log4j.logger.org.apache.nutch.scoring.webgraph.WebGraph=INFO,cmdstdout
log4j.logger.org.apache.nutch.scoring.webgraph.NodeDumper=INFO,cmdstdout
log4j.logger.org.apache.nutch.segment.SegmentChecker=INFO,cmdstdout
log4j.logger.org.apache.nutch.segment.SegmentMerger=INFO,cmdstdout
log4j.logger.org.apache.nutch.segment.SegmentReader=INFO,cmdstdout
log4j.logger.org.apache.nutch.tools.FreeGenerator=INFO,cmdstdout
log4j.logger.org.apache.nutch.util.domain.DomainStatistics=INFO,cmdstdout
log4j.logger.org.apache.nutch.util.SitemapProcessor=INFO,cmdstdout

log4j.logger.org.apache.nutch=INFO
log4j.logger.org.apache.hadoop=WARN
# log mapreduce job messages and counters
log4j.logger.org.apache.hadoop.mapreduce.Job=INFO

#
# Daily Rolling File Appender
#

log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}

# Rollover at midnight
log4j.appender.DRFA.DatePattern=.yyyy-MM-dd

# 30-day backup
#log4j.appender.DRFA.MaxBackupIndex=30
log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout

# Pattern format: Date LogLevel LoggerName LogMessage
log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n
# Debugging Pattern format: Date LogLevel LoggerName (FileName:MethodName:LineNo) LogMessage
#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n


#
# stdout
# Add *stdout* to rootlogger above if you want to use this 
#

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n

#
# plain layout used for commandline tools to output to console
#
log4j.appender.cmdstdout=org.apache.log4j.ConsoleAppender
log4j.appender.cmdstdout.layout=org.apache.log4j.PatternLayout
log4j.appender.cmdstdout.layout.ConversionPattern=%m%n

#
# Rolling File Appender
#

#log4j.appender.RFA=org.apache.log4j.RollingFileAppender
#log4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}

# Logfile size and and 30-day backups
#log4j.appender.RFA.MaxFileSize=1MB
#log4j.appender.RFA.MaxBackupIndex=30

#log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
#log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n
#log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n

#
# Plugin-Specific Loggers
#
#log4j.logger.org.apache.nutch.indexwriter.elasticrest.ElasticRestIndexWriter=INFO,cmdstdout