@Test public void checkUseOfCachedOutputStream() { System.setErr(replacement); System.setProperty(SimpleLogger.CACHE_OUTPUT_STREAM_STRING_KEY, "true"); SimpleLogger.init(); SimpleLogger simpleLogger = new SimpleLogger(this.getClass().getName()); System.setErr(original); simpleLogger.info("hello"); replacement.flush(); assertTrue(bout.toString().contains("INFO "+this.getClass().getName()+" - hello")); }
static void init() { CONFIG_PARAMS = new SimpleLoggerConfiguration(); CONFIG_PARAMS.init(); }
SimpleLogger extends LegacyAbstractLogger { static void init() { CONFIG_PARAMS = new SimpleLoggerConfiguration(); CONFIG_PARAMS.init(); } }
SimpleLogger extends LegacyAbstractLogger { static void init() { CONFIG_PARAMS = new SimpleLoggerConfiguration(); CONFIG_PARAMS.init(); } SimpleLogger(String name); }
SimpleLogger extends LegacyAbstractLogger { static void init() { CONFIG_PARAMS = new SimpleLoggerConfiguration(); CONFIG_PARAMS.init(); } SimpleLogger(String name); boolean isTraceEnabled(); boolean isDebugEnabled(); boolean isInfoEnabled(); boolean isWarnEnabled(); boolean isErrorEnabled(); void log(LoggingEvent event); }
SimpleLogger extends LegacyAbstractLogger { static void init() { CONFIG_PARAMS = new SimpleLoggerConfiguration(); CONFIG_PARAMS.init(); } SimpleLogger(String name); boolean isTraceEnabled(); boolean isDebugEnabled(); boolean isInfoEnabled(); boolean isWarnEnabled(); boolean isErrorEnabled(); void log(LoggingEvent event); static final String SYSTEM_PREFIX; static final String LOG_KEY_PREFIX; static final String CACHE_OUTPUT_STREAM_STRING_KEY; static final String WARN_LEVEL_STRING_KEY; static final String LEVEL_IN_BRACKETS_KEY; static final String LOG_FILE_KEY; static final String SHOW_SHORT_LOG_NAME_KEY; static final String SHOW_LOG_NAME_KEY; static final String SHOW_THREAD_NAME_KEY; static final String DATE_TIME_FORMAT_KEY; static final String SHOW_DATE_TIME_KEY; static final String DEFAULT_LOG_LEVEL_KEY; }