Package org.slf4j

Examples of org.slf4j.Logger.error()


                final JobContext jobCtx = new JobContextImpl(name, configuration);
                ((org.apache.sling.commons.scheduler.Job) job).execute(jobCtx);
            } else if (job instanceof Runnable) {
                ((Runnable) job).run();
            } else {
                logger.error("Scheduled job {} is neither a job nor a runnable.", job);
            }
        } catch (final Throwable t) {
            // if this is a quartz exception, rethrow it
            if (t instanceof JobExecutionException) {
                throw (JobExecutionException) t;
View Full Code Here


            // if this is a quartz exception, rethrow it
            if (t instanceof JobExecutionException) {
                throw (JobExecutionException) t;
            }
            // there is nothing we can do here, so we just log
            logger.error("Exception during job execution of " + job + " : " + t.getMessage(), t);
        } finally {

            this.release(data);
        }
    }
View Full Code Here

    @Test
    public void testSLF4J() throws Exception {
        Logger logsrv = LoggerFactory.getLogger(LogServiceTest.class);
        String msg = "LogServiceTest SLF4J ";
        logsrv.error(msg + " ERROR");
        logsrv.warn(msg + " WARN");
        logsrv.info(msg + " INFO");
        logsrv.debug(msg + " DEBUG");
    }
View Full Code Here

        Session session = mockSession();
        Logger logger = mockLogger();

        expect(session.get(SampleEntity.class, new Long(12345))).andReturn(null);

        logger.error("Unable to convert client value '12345' into an entity instance.");

        replay();

        RootClass persistentClass = new RootClass();
        Property idProperty = new Property();
View Full Code Here

        train_getLogger(element, logger);

        listener1.containingPageDidDetach();
        setThrowable(t);

        logger.error(contains("failed during page detach"), same(t));

        listener2.containingPageDidDetach();

        replay();
View Full Code Here

        train_getLogger(element, logger);

        listener1.containingPageDidDetach();
        setThrowable(t);

        logger.error(contains("failed during page detach"), same(t));

        listener2.containingPageDidDetach();

        replay();
View Full Code Here

        l1.registryDidShutdown();
        l2.registryDidShutdown();
        setThrowable(t);

        logger.error(contains("Shutdown failure."), same(t));

        l3.registryDidShutdown();

        replay();
View Full Code Here

        {
            purgeManager.purge( schedule );
        }
        catch ( ContinuumPurgeManagerException e )
        {
            logger.error( "Error purging for job" + jobName + ".", e );
        }

        try
        {
            if ( schedule.getDelay() > 0 )
View Full Code Here

        {
            continuum.buildProjects( schedule );
        }
        catch ( ContinuumException e )
        {
            logger.error( "Error building projects for job" + jobName + ".", e );
        }

        try
        {
            if ( schedule.getDelay() > 0 )
View Full Code Here

    public static void error( Session session, String message )
    {
        Logger log = getLogger( session );
        if( log.isErrorEnabled() )
        {
            log.error( String.valueOf( session.getAttribute( PREFIX ) ) + message );
        }
    }

    public static void error( Session session, String message, Throwable cause )
    {
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.