code: public static void configureLog4J() {
          String log4jConf = System.getProperty("log4j.configuration");
          if (null != log4jConf) {
              PropertyConfigurator.configure(log4jConf);
          } else {
              System.err.println("No log4j.configuration property specified. Using defaults.");
              BasicConfigurator.configure();
          }
      }
docs: Configures LOG4J using a configuration file given in a log4j.configuration system property.