public synchronized void scanIfNeeded(FileStatus fs) { long newModTime = fs.getModificationTime(); if (modTime != newModTime) { Path p = fs.getPath(); try { scanIntermediateDirectory(p); // If scanning fails, we will scan again. We assume the failure is // temporary. modTime = newModTime; } catch (IOException e) { /* LOG.error("Error while trying to scan the directory "+p,e) */ LOG.error_while_trying_scan_directory(p.toString(), e.toString()).error(); } } else { if (LogGlobal.isDebugEnabled()) { /* LOG.debug("Scan not needed of "+fs.getPath()) */ LOG.scan_not_needed(String.valueOf(fs.getPath())).tag("methodCall").debug(); } } }