/** * This method is for debugging purpose only. * * @param pProperties a properties bundle initialised as log4testng * property file would be. * @param pOut the standard output stream to be used for logging. * @param pErr the standard error stream to be used for logging. */ private static synchronized void testInitialize(Properties pProperties, PrintStream pOut, PrintStream pErr) { initialized= true; loggers.clear(); rootLoggerLevel= WARN; debug= false; out= pOut; err= pErr; checkProperties(pProperties); }
/** * This method is for debugging purpose only. * * @param pProperties a properties bundle initialised as log4testng property file would be. * @param pOut the standard output stream to be used for logging. * @param pErr the standard error stream to be used for logging. */ private static synchronized void testInitialize( Properties pProperties, PrintStream pOut, PrintStream pErr) { initialized = true; loggers.clear(); rootLoggerLevel = WARN; debug = false; out = pOut; err = pErr; checkProperties(pProperties); }
private static synchronized void initialize() { if(initialized) { return; } // We flag as initialized right away because if anything goes wrong // We still consider it initialized. TODO Is this OK? initialized= true; InputStream is= Thread.currentThread().getContextClassLoader().getResourceAsStream("log4testng.properties"); if(is == null) { return; } Properties properties= new Properties(); try { properties.load(is); } catch(IOException e) { throw new RuntimeException(e); } checkProperties(properties); }
private static synchronized void initialize() { if (initialized) { return; } // We flag as initialized right away because if anything goes wrong // We still consider it initialized. TODO Is this OK? initialized = true; InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("log4testng.properties"); if (is == null) { return; } Properties properties = new Properties(); try { properties.load(is); } catch (IOException e) { throw new RuntimeException(e); } checkProperties(properties); }