p.put("log4j.appender.A1.layout", "org.apache.log4j.PatternLayout"); if (showThreads) { p.put("log4j.appender.A1.layout.ConversionPattern", "[%t] [%x] %p: %m%n"); } else { p.put("log4j.appender.A1.layout.ConversionPattern", "[%x] %p: %m%n"); } PropertyConfigurator.configure(p);
    public static void toolSetupLog4j(String defaultLevel, String propsFile) {           if (propsFile != null && new File(propsFile).exists()) {        	PropertyConfigurator.configure(propsFile);        } else {            toolSetupLog4j(defaultLevel, null, false);        }    }