Create the debug log at the specified location if possible. If this call
fails, {@link #isOpen} returns false and diagnostic information will be
printed to System.err.
439677
static void open(File dir, String fileName) {
        if (dir.mkdirs() || dir.isDirectory()) {
            File file = new File(dir, fileName);
            try {
                out = new PrintStream(TextFileOutputStreamFactory.createOutputStream(file), true, "UTF-8");
                openedFile = file;
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }
1344745
public static Map<String, IDLProxyObject> create(InputStream is, boolean debug, File path) throws IOException {
        return create(is, debug, path, true);

    }
365808
protected void createFindbugsEngine() {
        findbugsEngine = new Java();
        findbugsEngine.setProject(getProject());
        findbugsEngine.setTaskName(getTaskName());
        findbugsEngine.setFork(true);
        if (jvm.length() > 0) {
            findbugsEngine.setJvm(jvm);
        }
        findbugsEngine.setTimeout(timeout);

        if (debug) {
            jvmargs = jvmargs + " -Dfindbugs.debug=true";
        }
        jvmargs = jvmargs + " -Dfindbugs.hostApp=FBAntTask";
        findbugsEngine.createJvmarg().setLine(jvmargs);

        // Add JVM arguments for system properties
        for (SystemProperty systemProperty : systemPropertyList) {
            String jvmArg = "-D" + systemProperty.getName() + "=" + systemProperty.getValue();
            findbugsEngine.createJvmarg().setValue(jvmArg);
        }

        if (homeDir != null) {
            // Use findbugs.home to locate findbugs.jar and the standard
            // plugins. This is the usual means of initialization.
            File findbugsLib = new File(homeDir, "lib");
            if (!findbugsLib.exists() && "lib".equals(homeDir.getName())) {
                findbugsLib = homeDir;
                homeDir = homeDir.getParentFile();
            }
            File findbugsLibFindBugs = new File(findbugsLib, "spotbugs.jar");
            // log("executing using home dir [" + homeDir + "]");
            if (findbugsLibFindBugs.exists()) {
                findbugsEngine.setClasspath(new Path(getProject(), findbugsLibFindBugs.getPath()));
            } else {
                throw new IllegalArgumentException("Can't find spotbugs.jar in " + findbugsLib);
            }
            findbugsEngine.createJvmarg().setValue("-Dspotbugs.home=" + homeDir.getPath());
        } else {
            // Use an explicitly specified classpath and list of plugin Jars
            // to initialize. This is useful for other tools which may have
            // FindBugs installed using a non-standard directory layout.

            findbugsEngine.setClasspath(classpath);
        }
        if (pluginList != null) {
            addArg("-pluginList");
            addArg(pluginList.toString());
        }
        // Set the main class to be whatever the subclass's constructor
        // specified.
        findbugsEngine.setClassname(mainClass);
    }
1224016
@Override
  public Source create() throws InitializationFailedException {
    Source source = null;
    try {
      source = sourceClass.newInstance();
    } catch (InstantiationException e) {
      LOG.fatal("Creating source failed, " + SOURCE_CLASS_CONFIG_KEY + ": " + sourceClass, e);
      System.exit(0);
    } catch (IllegalAccessException e) {
      LOG.fatal("Creating source failed, " + SOURCE_CLASS_CONFIG_KEY + ": " + sourceClass, e);
      System.exit(0);
    }
    LOG.info("Initializing source...");
    source.init(config);
    LOG.info("Initializing source... DONE.");
    return source;
  }
931517
public static void main(final String[] args)
    throws IOException
  {

    System.out.println(Version.about());
    System.out.println("ISO 6709 geographic point location tester. ");
    System.out.println("For example, enter: +401213-0750015/");
    System.out.println("Enter a blank line to quit.");
    System.out.println("Starting. " + new Date());

    final BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String inputLine = "starter";
    while (inputLine != null && inputLine.trim().length() > 0)
    {
      try
      {
        System.out.print("Enter an ISO 6709 geographic point location: ");
        inputLine = in.readLine();
        // Parse and print location point
        final PointLocation pointLocation = PointLocationParser
          .parsePointLocation(inputLine);
        System.out.println(pointLocation);
        System.out.println(PointLocationFormatter
          .formatPointLocation(pointLocation, PointLocationFormatType.LONG));
      }
      catch (final ParserException e)
      {
        System.out.println(e.getMessage());
      }
      catch (final FormatterException e)
      {
        System.err.println(e.getMessage());
      }
    }
    System.out.println("Done. " + new Date());

  }
1146664
public void log(Throwable error, String description) {
    log(error, null, description, null);
  }
862719
public void debug(Object message, Throwable t)
    {
        getLogger().debug(message.toString(), t);
    }
602137
public void logDebug(@Nullable final String text) {
    if (text != null && this.preprocessorLogger != null) {
      this.preprocessorLogger.debug(text);
    }
  }
204405
static Logger createLogger(Namespace namespace) {
    String logConfig = namespace.getString("log_config");
    if (logConfig != null) {
      System.setProperty("logback.configurationFile", logConfig);
    }
    System.setProperty("atomix.log.directory", namespace.getString("log_dir"));
    System.setProperty("atomix.log.level", namespace.getString("log_level"));
    System.setProperty("atomix.log.console.level", namespace.getString("console_log_level"));
    System.setProperty("atomix.log.file.level", namespace.getString("file_log_level"));
    return LoggerFactory.getLogger(AtomixAgent.class);
  }
512926
public static Map<String, IDLProxyObject> create(String data, boolean debug, File path) {
        return create(data, debug, path, true);
    }
322936
@Override
    public void debug(String format, Object arg) {
        if (logger.isDebugEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, arg);
            logger.debug(ft.getMessage(), ft.getThrowable());
        }
    }
506871
def logdebug(logger, msg, *args, **kwargs):
    '''
    
    '''
    if esgfpid.defaults.LOG_DEBUG_TO_INFO:
        logger.info('DEBUG %s ' % msg, *args, **kwargs)
    else:
        logger.debug(msg, *args, **kwargs)
1283906
public static LogRecord create(SitLogger logger, LogLevelVo logLevel, TestStep testStep,
            String messageKey, Object... params) {

        String msg = MessageManager.getMessage(messageKey, params);

        switch (logLevel) {
            case INFO:
                logger.infoMsg(msg);
                break;
            case DEBUG:
                logger.debugMsg(msg);
                break;
            case ERROR:
                logger.errorMsg(msg);
                break;
            case WARN:
                logger.warnMsg(msg);
                break;
            default:
                logger.infoMsg(msg);
        }

        String testStepNo = testStep == null ? "xxx" : testStep.getNo();

        return new LogRecord(testStepNo, msg);
    }
485572
public void debug(Marker marker, String format, Object... argArray) {
        if (!logger.isDebugEnabled(marker))
            return;
        if (instanceofLAL) {

            FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray);
            ((LocationAwareLogger) logger).log(marker, fqcn, LocationAwareLogger.DEBUG_INT, ft.getMessage(), argArray, ft.getThrowable());
        } else {
            logger.debug(marker, format, argArray);
        }
    }
1021121
def _debug_log(self, msg):
        """"""
        if not self.debug:
            return
        sys.stderr.write('{}\n'.format(msg))
278340
public static void debug(final Throwable throwable) {
        final StringWriter errors = new StringWriter();
        throwable.printStackTrace(new PrintWriter(errors));
        debugLogger.accept(errors.toString());
    }
209
public static void setTrace(boolean trace) {
        FallbackLoggerConfiguration.trace.set(trace);
        if (trace) {
            debug.set(true);
        }
    }