Package org.apache.commons.logging

Examples of org.apache.commons.logging.Log.debug()


    public void sessionCreated(HttpSessionEvent event) {
        HttpSessionCreatedEvent e = new HttpSessionCreatedEvent(event.getSession());
        Log log = LogFactory.getLog(LOGGER_NAME);

        if (log.isDebugEnabled()) {
            log.debug("Publishing event: " + e);
        }

        getContext(event.getSession().getServletContext()).publishEvent(e);
    }
View Full Code Here


    public void sessionDestroyed(HttpSessionEvent event) {
        HttpSessionDestroyedEvent e = new HttpSessionDestroyedEvent(event.getSession());
        Log log = LogFactory.getLog(LOGGER_NAME);

        if (log.isDebugEnabled()) {
            log.debug("Publishing event: " + e);
        }

        getContext(event.getSession().getServletContext()).publishEvent(e);
    }
}
View Full Code Here

    private void try_entry(String methodName, String expected, Object... arguments)
    {
        Log log = mockLog();
        ExceptionTracker tracker = mockExceptionTracker();

        log.debug("[ENTER] " + expected);

        replay();

        new ServiceLogger(log, tracker).entry(methodName, arguments);
View Full Code Here

    private void try_exit(String methodName, String expected, Object result)
    {
        Log log = mockLog();
        ExceptionTracker tracker = mockExceptionTracker();

        log.debug("[ EXIT] " + expected);

        replay();

        new ServiceLogger(log, tracker).exit(methodName, result);
View Full Code Here

    public void void_exit_test()
    {
        Log log = mockLog();
        ExceptionTracker tracker = mockExceptionTracker();

        log.debug("[ EXIT] wilma");

        replay();

        new ServiceLogger(log, tracker).voidExit("wilma");
View Full Code Here

        train_isDebugEnabled(log, true);

        train_exceptionLogged(tracker, t, false);

        log.debug("[ FAIL] wilma -- " + t.getClass().getName(), t);

        replay();

        new ServiceLogger(log, tracker).fail("wilma", t);
View Full Code Here

        train_isDebugEnabled(log, true);

        train_exceptionLogged(tracker, t, true);

        log.debug("[ FAIL] wilma -- " + t.getClass().getName(), null);

        replay();

        new ServiceLogger(log, tracker).fail("wilma", t);
View Full Code Here

    {
        Log log = mockLog();
        Runnable delegate = mockRunnable();

        train_isDebugEnabled(log, true);
        log.debug("[ENTER] run()");

        delegate.run();

        log.debug("[ EXIT] run");
View Full Code Here

        train_isDebugEnabled(log, true);
        log.debug("[ENTER] run()");

        delegate.run();

        log.debug("[ EXIT] run");

        replay();

        LoggingDecorator ld = newLoggingDecorator();
        Runnable interceptor = ld.build(Runnable.class, delegate, "foo.Bar", log);
View Full Code Here

        Throwable t = new RuntimeException("From delegate.");
        Log log = mockLog();
        Runnable delegate = mockRunnable();

        train_isDebugEnabled(log, true);
        log.debug("[ENTER] run()");

        delegate.run();
        setThrowable(t);

        train_isDebugEnabled(log, true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.