hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Gassmann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1078) Improve logging
Date Mon, 12 Mar 2007 08:57:09 GMT

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

Philippe Gassmann commented on HADOOP-1078:
-------------------------------------------

Also the use of StringUtils.stringifyException should be avoided in log messages eg : 
This code is *wrong* : LOG.error("Expire Launching Task Thread got exception: " + StringUtils.stringifyException(e));

This code is *good* : LOG.error("Expire Launching Task Thread got exception: ", e);

> Improve logging
> ---------------
>
>                 Key: HADOOP-1078
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1078
>             Project: Hadoop
>          Issue Type: Improvement
>            Reporter: Philippe Gassmann
>
> Loggers in hadoop are created using LogFactory.getLog("some package styled things");

> This is very confusing since the string specified in getLog() sometime is the class name
sometime not. (eg : the class org.apache.hadoop.mapred.Task contains a logger created by LogFactory.getLog("org.apache.hadoop.mapred.TaskRunner");
which is very confusing)
> I think that logger should be always created using  LogFactory.getLog(MyClass.class);
and that if a class needs a logger, then a specific logger must be crated for that class (ie:
loggers are private).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message