private BuildLogger createLogger ( ) { BuildLogger logger ; if ( args . loggerClassname != null ) { try { logger = ClasspathUtils . newInstance ( args . loggerClassname , Main . class . getClassLoader ( ) , BuildLogger . class ) ; } catch ( final BuildException e ) { printErrorMessage ( "The specified logger class " + args . loggerClassname + " could not be used because " + e . getMessage ( ) ) ; throw new RuntimeException ( ) ; } } else { logger = new DefaultLogger ( ) ; ( ( DefaultLogger ) logger ) . useColor ( args . useColor ) ; } logger . setMessageOutputLevel ( args . msgOutputLevel ) ; logger . setOutputPrintStream ( out ) ; logger . setErrorPrintStream ( err ) ; logger . setEmacsMode ( args . emacsMode ) ; return logger ; }
Creates the default build logger for sending build events to the ant log .