@Test public void findLogger() { String loggerName = "testLogger"; Log log = LogFactory.getLog( loggerName ); assertTrue( log instanceof Log4JLogger ); Log4JLogger log4jLogger = (Log4JLogger) log; Logger logger = log4jLogger.getLogger(); assertNotNull( logger ); assertNotNull( JobEntryUtils.findLogger( loggerName ) ); }
public static Logger findLogger( String logName ) { Log log = LogFactory.getLog( logName ); if ( log instanceof org.apache.commons.logging.impl.Log4JLogger ) { Logger logger = ( (org.apache.commons.logging.impl.Log4JLogger) log ).getLogger(); if ( logger == null ) { throw new IllegalArgumentException( "Logger does not exist for log: " + logName ); } return logger; } else if ( log == null ) { throw new IllegalArgumentException( "Unknown log name: " + logName ); } else { throw new IllegalArgumentException( "Unsupported logging type: " + log.getClass() ); } }
JobEntryUtils { public static Logger findLogger( String logName ) { Log log = LogFactory.getLog( logName ); if ( log instanceof org.apache.commons.logging.impl.Log4JLogger ) { Logger logger = ( (org.apache.commons.logging.impl.Log4JLogger) log ).getLogger(); if ( logger == null ) { throw new IllegalArgumentException( "Logger does not exist for log: " + logName ); } return logger; } else if ( log == null ) { throw new IllegalArgumentException( "Unknown log name: " + logName ); } else { throw new IllegalArgumentException( "Unsupported logging type: " + log.getClass() ); } } }
JobEntryUtils { public static Logger findLogger( String logName ) { Log log = LogFactory.getLog( logName ); if ( log instanceof org.apache.commons.logging.impl.Log4JLogger ) { Logger logger = ( (org.apache.commons.logging.impl.Log4JLogger) log ).getLogger(); if ( logger == null ) { throw new IllegalArgumentException( "Logger does not exist for log: " + logName ); } return logger; } else if ( log == null ) { throw new IllegalArgumentException( "Unknown log name: " + logName ); } else { throw new IllegalArgumentException( "Unsupported logging type: " + log.getClass() ); } }  }
JobEntryUtils { public static Logger findLogger( String logName ) { Log log = LogFactory.getLog( logName ); if ( log instanceof org.apache.commons.logging.impl.Log4JLogger ) { Logger logger = ( (org.apache.commons.logging.impl.Log4JLogger) log ).getLogger(); if ( logger == null ) { throw new IllegalArgumentException( "Logger does not exist for log: " + logName ); } return logger; } else if ( log == null ) { throw new IllegalArgumentException( "Unknown log name: " + logName ); } else { throw new IllegalArgumentException( "Unsupported logging type: " + log.getClass() ); } }  static Logger findLogger( String logName ); static void attachAppenderTo( Appender appender, LogLevel logLevel, Map<String, Level> logLevelCache,
      String... logNames ); static void removeAppenderFrom( Appender appender, Map<String, Level> logLevelCache, String... logNames ); static boolean asBoolean( String s, VariableSpace variableSpace ); static Long asLong( String s, VariableSpace variableSpace ); }
JobEntryUtils { public static Logger findLogger( String logName ) { Log log = LogFactory.getLog( logName ); if ( log instanceof org.apache.commons.logging.impl.Log4JLogger ) { Logger logger = ( (org.apache.commons.logging.impl.Log4JLogger) log ).getLogger(); if ( logger == null ) { throw new IllegalArgumentException( "Logger does not exist for log: " + logName ); } return logger; } else if ( log == null ) { throw new IllegalArgumentException( "Unknown log name: " + logName ); } else { throw new IllegalArgumentException( "Unsupported logging type: " + log.getClass() ); } }  static Logger findLogger( String logName ); static void attachAppenderTo( Appender appender, LogLevel logLevel, Map<String, Level> logLevelCache,
      String... logNames ); static void removeAppenderFrom( Appender appender, Map<String, Level> logLevelCache, String... logNames ); static boolean asBoolean( String s, VariableSpace variableSpace ); static Long asLong( String s, VariableSpace variableSpace );  }