Examples of Jdk14Logger


Examples of org.apache.commons.logging.impl.Jdk14Logger

            try { // need to be done with TCCL
                delegate = contextClassLoader
                    .loadClass("org.apache.commons.logging.impl.Log4JLogger")
                    .getConstructor(String.class).newInstance(category);
            } catch (final Exception ex) {
                delegate = new Jdk14Logger(category);
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.logging.impl.Jdk14Logger

      if (isLevelEnabled(level)){
           Pair<String, Throwable>  data = splitObjectsToLog(stackTraceIndex, objectsToLog);
       
           if (log instanceof Jdk14Logger){
             //optimization
             Jdk14Logger logger = (Jdk14Logger) log;
             log(logger.getLogger(), level, data.getLeft(),data.getRight());
           } else if ( "org.apache.commons.logging.impl.Log4JLogger".equals(log.getClass().getName() )) {
             if (log4jLevelMap == null){
               log4jLevelMap = CollectionFactory.getDefault().createMap(LEVEL_TRACE, org.apache.log4j.Level.TRACE, LEVEL_DEBUG, org.apache.log4j.Level.DEBUG, LEVEL_INFO, org.apache.log4j.Level.INFO, LEVEL_WARN, org.apache.log4j.Level.WARN, LEVEL_ERROR, org.apache.log4j.Level.ERROR, LEVEL_FATAL, org.apache.log4j.Level.FATAL);
             }
            
             Log4JLogger logger = (Log4JLogger) log;
             logger.getLogger().log(getClass().getName(), (org.apache.log4j.Priority) log4jLevelMap.get(level), data.getLeft(),data.getRight());
           } else {
          
            boolean rightIsNull = CollectionUtilitities.isRightNull(data);
          switch (level){
          case LEVEL_TRACE:
View Full Code Here

Examples of org.apache.commons.logging.impl.Jdk14Logger

    if (logEverything || isLevelEnabled(level)) {
           Pair<String, Throwable>  data = splitObjectsToLog(stackTraceIndex, objectsToLog);
       
           if (log instanceof Jdk14Logger){
             //optimization
             Jdk14Logger logger = (Jdk14Logger) log;
             log(logger.getLogger(), level, data.getLeft(),data.getRight());
           } else if ( "org.apache.commons.logging.impl.Log4JLogger".equals(log.getClass().getName() )) {
             Log4JLogger logger = (Log4JLogger) log;
        logger.getLogger().log(getClass().getName(),
            level.getLog4jLevel(), data.getLeft(), data.getRight());
           } else {
          
        boolean rightIsNull = ContainerBoostUtils.isRightNull(data);
          switch (level){
View Full Code Here

Examples of org.apache.commons.logging.impl.Jdk14Logger

            try { // need to be done with TCCL
                delegate = contextClassLoader
                        .loadClass("org.apache.commons.logging.impl.Log4JLogger")
                        .getConstructor(String.class).newInstance(category);
            } catch (final Exception ex) {
                delegate = new Jdk14Logger(category);
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.logging.impl.Jdk14Logger

  @Before
  public void init() throws SecurityException, IOException {
    this.defaultLocale = Locale.getDefault();
    Locale.setDefault(Locale.ENGLISH);
    this.logger = new Jdk14Logger(getClass().getName());
  }
View Full Code Here

Examples of org.codehaus.dna.impl.Jdk14Logger

    public void testLogkitLoggerEmptyCtor()
        throws Exception
    {
        try
        {
            new Jdk14Logger( null );
        }
        catch( NullPointerException npe )
        {
            assertEquals( "npe.getMessage()", "logger", npe.getMessage() );
        }
View Full Code Here

Examples of org.codehaus.dna.impl.Jdk14Logger

    }

    public void testJdk14LoggerGetChildLogger()
        throws Exception
    {
        final Jdk14Logger logger = createLogger( Level.FINE );

        assertNotSame( "logger.getChildLogger == logger",
                       logger,
                       logger.getChildLogger( "whatever" ) );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.Jdk14Logger

        final Level type = Level.FINEST;
        final String message = "Meep!";
        final Throwable throwable = null;
        final boolean output = true;

        final Jdk14Logger logger = createLogger( level );
        logger.trace( message );
        checkLogger( output, message, throwable, type );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.Jdk14Logger

        throws Exception
    {
        final Level level = Level.OFF;
        final String message = "Meep!";

        final Jdk14Logger logger = createLogger( level );
        logger.trace( message );
        checkLogger( false, null, null, null );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.Jdk14Logger

        final Level type = Level.FINEST;
        final String message = "Meep!";
        final Throwable throwable = new Throwable();
        final boolean output = true;

        final Jdk14Logger logger = createLogger( level );

        logger.trace( message, throwable );
        checkLogger( output, message, throwable, type );
    }
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.