@Test public void testAddListener() throws Throwable { Logger logger = new Logger(); LogListener l = new SimpleLogListener(); logger.addListener(l); assertEquals(1, logger.listeners.size(), "m_logger.listeners.size()"); assertSame(l, logger.listeners.get(0), "m_logger.listeners.get(0)"); }
public void addListener (LogListener l) { listeners.add(l); }
Logger implements LogProducer,Configurable { public void addListener (LogListener l) { listeners.add(l); } }
Logger implements LogProducer,Configurable { public void addListener (LogListener l) { listeners.add(l); } Logger(); }
Logger implements LogProducer,Configurable { public void addListener (LogListener l) { listeners.add(l); } Logger(); Configuration getConfiguration(); @Override void setConfiguration(Configuration cfg); void addListener(LogListener l); void removeListener(LogListener l); void removeAllListeners(); static void log(LogEvent evt); void setName(String name); void destroy(); synchronized static Logger getLogger(String name); String getName(); boolean hasListeners(); }
Logger implements LogProducer,Configurable { public void addListener (LogListener l) { listeners.add(l); } Logger(); Configuration getConfiguration(); @Override void setConfiguration(Configuration cfg); void addListener(LogListener l); void removeListener(LogListener l); void removeAllListeners(); static void log(LogEvent evt); void setName(String name); void destroy(); synchronized static Logger getLogger(String name); String getName(); boolean hasListeners(); static final String NRPREFIX; }