title: Disabling Log4J logs during maven test phase
body: <p>Trace and debug logs can be helpful while doing development in the IDE, but during the build I find those lines quite disturbing, and obfuscating the report printed out by maven or other build tools.</p>
  
  <p>It would be nice to have log4j honoring a system property like <code>-Dlog4j.rootLogger=OFF</code><sup>1</sup> to use with maven or something which doesn't require changes on the project files. 
  I know I can specify the <code>-Dlog4j.configuration=alternateconfig.props</code> <sup>2</sup> but I'm asking here to find out if somebody found a smarter way to disable logging during the build process with minimal manual intervention. I.e. some java class detecting maven as caller that disables log4j, or other smart solutions.</p>
  
  <p>Any hint?</p>
  
  <p>Notes:</p>
  
  <p>[1]: already tried, and it doesnt work.</p>
  
  <p>[2]: that's pretty good, but it doesn't seem to work well with maven (maybe surefire skips it)</p>