@Test public void testLog() throws Throwable { FilterLogListener filterLogListener = new FilterLogListener(); filterLogListener.close(); LogEvent result = filterLogListener.log(null); assertNull(result, "result"); }
@Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; }
FilterLogListener implements LogListener,Configurable { @Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; } }
FilterLogListener implements LogListener,Configurable { @Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; } FilterLogListener();  FilterLogListener(PrintStream p); }
FilterLogListener implements LogListener,Configurable { @Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; } FilterLogListener();  FilterLogListener(PrintStream p); @Override void setConfiguration(Configuration cfg); synchronized void setPrintStream(PrintStream p); synchronized void close(); String getPriority(); void setPriority(String priority); boolean permitLogging(String tagLevel); @Override synchronized LogEvent log(LogEvent ev); }
FilterLogListener implements LogListener,Configurable { @Override public synchronized LogEvent log(LogEvent ev) { if (p != null && permitLogging(ev.getTag())) { Date d = new Date(); p.println( "<log realm=\"" + ev.getRealm() + "\" at=\"" + d.toString() + "." + d.getTime() % 1000 + "\">" ); ev.dump(p, " "); p.println("</log>"); p.flush(); } return ev; } FilterLogListener();  FilterLogListener(PrintStream p); @Override void setConfiguration(Configuration cfg); synchronized void setPrintStream(PrintStream p); synchronized void close(); String getPriority(); void setPriority(String priority); boolean permitLogging(String tagLevel); @Override synchronized LogEvent log(LogEvent ev);  }