Package org.codehaus.dna.impl

Examples of org.codehaus.dna.impl.Log4JLogger


    public void testConsoleLevelComparisonWithDebugEnabled()
        throws Exception
    {
        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, Level.DEBUG );

        assertEquals( "logger.isTraceEnabled()", true, logger.isTraceEnabled() );
        assertEquals( "logger.isDebugEnabled()", true, logger.isDebugEnabled() );
        assertEquals( "logger.isInfoEnabled()", true, logger.isInfoEnabled() );
        assertEquals( "logger.isWarnEnabled()", true, logger.isWarnEnabled() );
        assertEquals( "logger.isErrorEnabled()", true, logger.isErrorEnabled() );
    }
View Full Code Here


    public void testConsoleLevelComparisonWithInfoEnabled()
        throws Exception
    {
        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, Level.INFO );

        assertEquals( "logger.isTraceEnabled()", false, logger.isTraceEnabled() );
        assertEquals( "logger.isDebugEnabled()", false, logger.isDebugEnabled() );
        assertEquals( "logger.isInfoEnabled()", true, logger.isInfoEnabled() );
        assertEquals( "logger.isWarnEnabled()", true, logger.isWarnEnabled() );
        assertEquals( "logger.isErrorEnabled()", true, logger.isErrorEnabled() );
    }
View Full Code Here

    public void testConsoleLevelComparisonWithWarnEnabled()
        throws Exception
    {
        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, Level.WARN );

        assertEquals( "logger.isTraceEnabled()", false, logger.isTraceEnabled() );
        assertEquals( "logger.isDebugEnabled()", false, logger.isDebugEnabled() );
        assertEquals( "logger.isInfoEnabled()", false, logger.isInfoEnabled() );
        assertEquals( "logger.isWarnEnabled()", true, logger.isWarnEnabled() );
        assertEquals( "logger.isErrorEnabled()", true, logger.isErrorEnabled() );
    }
View Full Code Here

    public void testConsoleLevelComparisonWithErrorEnabled()
        throws Exception
    {
        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, Level.ERROR );

        assertEquals( "logger.isTraceEnabled()", false, logger.isTraceEnabled() );
        assertEquals( "logger.isDebugEnabled()", false, logger.isDebugEnabled() );
        assertEquals( "logger.isInfoEnabled()", false, logger.isInfoEnabled() );
        assertEquals( "logger.isWarnEnabled()", false, logger.isWarnEnabled() );
        assertEquals( "logger.isErrorEnabled()", true, logger.isErrorEnabled() );
    }
View Full Code Here

    {
        final Logger log4jLogger = Logger.getLogger( "test" );
        log4jLogger.removeAllAppenders();
        log4jLogger.addAppender( target );
        log4jLogger.setLevel( priority );
        return new Log4JLogger( log4jLogger );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.dna.impl.Log4JLogger

Copyright © 2018 www.massapicom. 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.