You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2014/12/18 23:48:13 UTC
[jira] [Moved] (HADOOP-11430) Add GenericTestUtils#disableLog,
GenericTestUtils#setLogLevel
[ https://issues.apache.org/jira/browse/HADOOP-11430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colin Patrick McCabe moved HDFS-7549 to HADOOP-11430:
-----------------------------------------------------
Target Version/s: 2.7.0 (was: 2.7.0)
Affects Version/s: (was: 2.7.0)
2.6.0
Key: HADOOP-11430 (was: HDFS-7549)
Project: Hadoop Common (was: Hadoop HDFS)
> Add GenericTestUtils#disableLog, GenericTestUtils#setLogLevel
> -------------------------------------------------------------
>
> Key: HADOOP-11430
> URL: https://issues.apache.org/jira/browse/HADOOP-11430
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 2.6.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HADOOP-11430.001.patch
>
>
> Now that we are using both commons-logging and slf4j, we can no longer rely on just casting the Log object to a {{Log4JLogger}} and calling {{setLevel}} on that. With {{org.slf4j.Logger}} objects, we need to look up the underlying {{Log4JLogger}} using {{LogManager#getLogger}}.
> This patch adds {{GenericTestUtils#disableLog}} and {{GenericTestUtils#setLogLevel}} functions which hide this complexity from unit tests, just allowing the tests to call {{disableLog}} or {{setLogLevel}}, and have {{GenericTestUtils}} figure out the right thing to do based on the log / logger type.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)