[ 
https://issues.apache.org/jira/browse/HADOOP-9487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13676865#comment-13676865
 ] 

Steve Loughran commented on HADOOP-9487:
----------------------------------------

No, I'm proposing a separate Commons Logging logger

First, the classic log
{code}
 Log LOG = LogFactory.getLog(Configuration.class);
{code}
Now, a new one purely for deprecation
{code}
 Log LOG_DEPRECATION = 
LogFactory.getLog("org.apache.hadoop.conf.Configuration.deprecation");
{code}

You log deprecation at info:

{code}
 LOG_DEPRECATION.info("mapred.speculative.execution.slowNodeThreshold is 
deprecated")
{code}

Now you can tune deprecation warnings in Log4J
{code}
log4j.logger.org.apache.hadoop.conf.Configuration=INFO
log4j.logger.org.apache.hadoop.conf.Configuration.Deprecation=WARN
{code}

See? No new config options, just tuning log messages via Log4J, which is 
usuallyy the best place to do it

                
> Deprecation warnings in Configuration should go to their own log or otherwise 
> be suppressible
> ---------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9487
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9487
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 3.0.0
>            Reporter: Steve Loughran
>
> Running local pig jobs triggers large quantities of warnings about deprecated 
> properties -something I don't care about as I'm not in a position to fix 
> without delving into Pig. 
> I can suppress them by changing the log level, but that can hide other 
> warnings that may actually matter.
> If there was a special Configuration.deprecated log for all deprecation 
> messages, this log could be suppressed by people who don't want noisy logs

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to