Package org.apache.avalon.framework.logger

Examples of org.apache.avalon.framework.logger.Logger.warn()


        final Logger logger = getLogger();
        //final String cat = logger.getCategory();
        //defaultLogger.info( "Category is " + cat );
        logger.debug( message );
        logger.info( message );
        logger.warn( message );
        logger.error( message );
        logger.fatalError( message );
    }
}
View Full Code Here


        public void warn( final String message )
        {
            final Logger logger = getLogger();
            try
            {
                logger.warn( message );
            }
            finally
            {
                releaseLogger();
            }
View Full Code Here

        public void warn( final String message, final Throwable throwable )
        {
            final Logger logger = getLogger();
            try
            {
                logger.warn( message, throwable );
            }
            finally
            {
                releaseLogger();
            }
View Full Code Here

        final Logger logger = getLogger();
        //final String cat = logger.getCategory();
        //defaultLogger.info( "Category is " + cat );
        logger.debug( message );
        logger.info( message );
        logger.warn( message );
        logger.error( message );
        logger.fatalError( message );
    }
}
View Full Code Here

    public void testWrite()
        throws Exception
    {
        final Log4JConfLoggerManager manager = getManager( "log4j.xml" );
        final Logger logger = manager.getDefaultLogger();
        logger.warn( "Some random message" );
    }

    private Log4JConfLoggerManager getManager( final String resourceName )
        throws Exception
    {
View Full Code Here

        subcontext.put("context-work", this.workDir);
        if (this.servletContextPath == null) {
            File logSCDir = new File(this.workDir, "log");
            logSCDir.mkdirs();
            if (logger.isWarnEnabled()) {
                logger.warn("Setting context-root for LogKit to " + logSCDir);
            }
            subcontext.put("context-root", logSCDir.toString());
        } else {
            subcontext.put("context-root", this.servletContextPath);
        }
View Full Code Here

        mockLog.expects(once()).method("warn").with(eq("JUnit"));
        mockLog.expects(once()).method("warn").with(eq("JUnit"), same(exception));

        if(logger.isWarnEnabled())
        {
            logger.warn("JUnit");
            logger.warn("JUnit", exception);
        }
    }

    /**
 
View Full Code Here

        mockLog.expects(once()).method("warn").with(eq("JUnit"), same(exception));

        if(logger.isWarnEnabled())
        {
            logger.warn("JUnit");
            logger.warn("JUnit", exception);
        }
    }

    /**
     * Test error level.
View Full Code Here

        if (!canRunConcurrently) {
            Boolean isRunning = (Boolean)data.get(DATA_MAP_KEY_ISRUNNING);

            if ((null != isRunning) && isRunning.booleanValue()) {
                logger.warn("Cron job name '" + name +
                            " already running but configured to not allow concurrent runs. Will discard this scheduled run");

                return;
            }
        }
View Full Code Here

        subcontext.put("portlet-context", this.portletContext);
        if (this.portletContextPath == null) {
            File logSCDir = new File(this.workDir, "log");
            logSCDir.mkdirs();
            if (logger.isWarnEnabled()) {
                logger.warn("Setting servlet-context for LogKit to " + logSCDir);
            }
            subcontext.put("context-root", logSCDir.toString());
        } else {
            subcontext.put("context-root", this.portletContextPath);
        }
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.