code: 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;
      }
docs: Creates the default build logger for sending build events to the ant log.
  
  @return the logger instance for this build.