Description
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.
Attachments
Attachments
Issue Links
- relates to
-
HDFS-6860 BlockStateChange logs are too noisy
- Resolved