hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Turn off all Hadoop logs?
Date Thu, 01 Sep 2011 09:53:05 GMT
On 29/08/11 20:31, Frank Astier wrote:
> Is it possible to turn off all the Hadoop logs simultaneously? In my unit tests, I don’t
want to see the myriad “INFO” logs spewed out by various Hadoop components. I’m using:
>
>    ((Log4JLogger) DataNode.LOG).getLogger().setLevel(Level.OFF);
>      ((Log4JLogger) LeaseManager.LOG).getLogger().setLevel(Level.OFF);
>      ((Log4JLogger) FSNamesystem.LOG).getLogger().setLevel(Level.OFF);
>      ((Log4JLogger) DFSClient.LOG).getLogger().setLevel(Level.OFF);
>      ((Log4JLogger) Storage.LOG).getLogger().setLevel(Level.OFF);
>
> But I’m still missing some loggers...
>

you need a log4j.properties file on the CP that doesn't log so much. I 
do this by

  -removing /logj4.properties from the Hadoop jars in our (private) jar 
repository
  -having custom log4.properties files in the test/ source trees

You could also start junit with the right log4j properties to point it 
at a custom log4j file. I forget what that property is.


Mime
View raw message