private void initSystemLogger() { File loggerConfig = new File(deployDir, LOGGER_CONFIG); if (loggerConfig.canRead()) { hasSystemLogger = true; try { register(loggerConfig); deploy(); } catch (Exception e) { getLog().warn("init-system-logger", e); } } getLog().info("Q2 started, deployDir=" + deployDir.getAbsolutePath()); }
public static int checkFiles(String[] filenames) { int errors = 0; for (String filename : filenames) { File file = new File(filename); if (!file.exists()) { System.err.println("error: file not found: " + file); ++errors; } else if (!file.canRead()) { System.err.println("error: file not readable: " + file); ++errors; } } return errors; }
public boolean accept(File f) { return f.canRead() && (f.getName().endsWith(".xml") || (recursive && f.isDirectory() && !"lib".equalsIgnoreCase(f.getName()))); }