@Test @Disabled("test causes problems, closes stdout") public void testLog1() throws Throwable { RotateLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.close(); LogEvent result = dailyLogListener.log(null); assertNull(result, "result"); assertNull(((DailyLogListener) dailyLogListener).p, "(DailyLogListener) dailyLogListener.p"); assertEquals(1, ((DailyLogListener) dailyLogListener).msgCount, "(DailyLogListener) dailyLogListener.msgCount"); }
public synchronized LogEvent log (LogEvent ev) { if (msgCount++ > CHECK_INTERVAL) { checkSize(); msgCount = 0; } return super.log (ev); }
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { public synchronized LogEvent log (LogEvent ev) { if (msgCount++ > CHECK_INTERVAL) { checkSize(); msgCount = 0; } return super.log (ev); } }
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { public synchronized LogEvent log (LogEvent ev) { if (msgCount++ > CHECK_INTERVAL) { checkSize(); msgCount = 0; } return super.log (ev); } RotateLogListener(); }
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { public synchronized LogEvent log (LogEvent ev) { if (msgCount++ > CHECK_INTERVAL) { checkSize(); msgCount = 0; } return super.log (ev); } RotateLogListener(); void setConfiguration(Configuration cfg); synchronized LogEvent log(LogEvent ev); void logRotate(); synchronized void logRotate(boolean isStartup); void destroy(); }
RotateLogListener extends SimpleLogListener implements Configurable, Destroyable { public synchronized LogEvent log (LogEvent ev) { if (msgCount++ > CHECK_INTERVAL) { checkSize(); msgCount = 0; } return super.log (ev); } RotateLogListener(); void setConfiguration(Configuration cfg); synchronized LogEvent log(LogEvent ev); void logRotate(); synchronized void logRotate(boolean isStartup); void destroy(); static final int CHECK_INTERVAL; static final long DEFAULT_MAXSIZE; }