Package org.apache.commons.logging.impl

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


      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

    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

            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

  @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

TOP

Related Classes of org.apache.commons.logging.impl.Jdk14Logger

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.