@SuppressWarnings("unchecked") public Iterator<Appender<ILoggingEvent>> iteratorForAppenders() { if (aai == null) { return Collections.EMPTY_LIST.iterator(); } return aai.iteratorForAppenders(); }
public void invoke(Request request, Response response) throws IOException, ServletException { try { if (!alreadySetLogbackStatusManager) { alreadySetLogbackStatusManager = true; org.apache.catalina.Context tomcatContext = request.getContext(); if (tomcatContext != null) { ServletContext sc = tomcatContext.getServletContext(); if (sc != null) { sc.setAttribute(AccessConstants.LOGBACK_STATUS_MANAGER_KEY, getStatusManager()); } } } getNext().invoke(request, response); TomcatServerAdapter adapter = new TomcatServerAdapter(request, response); AccessEvent accessEvent = new AccessEvent(request, response, adapter); if (getFilterChainDecision(accessEvent) == FilterReply.DENY) { return; } // TODO better exception handling aai.appendLoopOnAppenders(accessEvent); } finally { request.removeAttribute(AccessConstants.LOGBACK_STATUS_MANAGER_KEY); } }
private int appendLoopOnAppenders(ILoggingEvent event) { if (aai != null) { return aai.appendLoopOnAppenders(event); } else { return 0; } }
public void log(Request jettyRequest, Response jettyResponse) { JettyServerAdapter adapter = new JettyServerAdapter(jettyRequest, jettyResponse); AccessEvent accessEvent = new AccessEvent(jettyRequest, jettyResponse, adapter); if (getFilterChainDecision(accessEvent) == FilterReply.DENY) { return; } aai.appendLoopOnAppenders(accessEvent); }
public void detachAndStopAllAppenders() { aai.detachAndStopAllAppenders(); }
public boolean isAttached(Appender<AccessEvent> appender) { return aai.isAttached(appender); }
public Appender<AccessEvent> getAppender(String name) { return aai.getAppender(name); }
public Iterator<Appender<AccessEvent>> iteratorForAppenders() { return aai.iteratorForAppenders(); }
public void addAppender(Appender<AccessEvent> newAppender) { aai.addAppender(newAppender); }
public void stop() { aai.detachAndStopAllAppenders(); started = false; }
public boolean detachAppender(String name) { if (aai == null) { return false; } return aai.detachAppender(name); }
/** Remove the appender passed as parameter form the list of appenders. */ public boolean detachAppender(Appender<ILoggingEvent> appender) { if (aai == null) { return false; } return aai.detachAppender(appender); }
public Appender<ILoggingEvent> getAppender(String name) { if (aai == null) { return null; } return aai.getAppender(name); }
public boolean isAttached(Appender<ILoggingEvent> appender) { if (aai == null) { return false; } return aai.isAttached(appender); }
// this method MUST be synchronized. See comments on 'aai' field for further // details. public synchronized void addAppender(Appender<ILoggingEvent> newAppender) { if (aai == null) { aai = new AppenderAttachableImpl<ILoggingEvent>(); } aai.addAppender(newAppender); }
public boolean detachAppender(Appender<AccessEvent> appender) { return aai.detachAppender(appender); }
public boolean detachAppender(String name) { return aai.detachAppender(name); }
/** * Remove all previously added appenders from this logger instance. * * <p>This is useful when re-reading configuration information. */ public void detachAndStopAllAppenders() { if (aai != null) { aai.detachAndStopAllAppenders(); } }