title: Where do I configure log4j in a JUnit test class?
body: <p>Looking at the last JUnit test case I wrote, I called log4j's BasicConfigurator.configure() method inside the class constructor.  That worked fine for running just that single class from Eclipse's "run as JUnit test case" command.  But I realize it's incorrect: I'm pretty sure our main test suite runs all of these classes from one process, and therefore log4j configuration should be happening higher up somewhere.</p>
  
  <p>But I still need to run a test case by itself some times, in which case I want log4j configured.  Where should I put the configuration call so that it gets run when the test case runs standalone, but not when the test case is run as part of a larger suite?</p>