mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 23:34:15 +01:00
updated logging
Former-commit-id: 940e4d2a7aba51931b1024c7426ba31bc686cc16
This commit is contained in:
@@ -241,7 +241,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
final AnalysisException ax = new AnalysisException(msg, ex);
|
final AnalysisException ax = new AnalysisException(msg, ex);
|
||||||
dependency.getAnalysisExceptions().add(ax);
|
dependency.getAnalysisExceptions().add(ax);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.INFO, msg, ex);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, null, ex);
|
||||||
return foundSomething;
|
return foundSomething;
|
||||||
}
|
}
|
||||||
List<String> pomEntries;
|
List<String> pomEntries;
|
||||||
@@ -271,11 +271,11 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
path, dependency.getFilePath());
|
path, dependency.getFilePath());
|
||||||
final AnalysisException ax = new AnalysisException(msg, ex);
|
final AnalysisException ax = new AnalysisException(msg, ex);
|
||||||
dependency.getAnalysisExceptions().add(ax);
|
dependency.getAnalysisExceptions().add(ax);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.INFO, msg, ax);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, msg, ax);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
final String msg = String.format("Unable to retrieve POM '%s' in '%s'",
|
final String msg = String.format("Unable to retrieve POM '%s' in '%s'",
|
||||||
path, dependency.getFilePath());
|
path, dependency.getFilePath());
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.INFO, msg, ex);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, msg, ex);
|
||||||
}
|
}
|
||||||
foundSomething = setPomEvidence(dependency, pom, pomProperties) || foundSomething;
|
foundSomething = setPomEvidence(dependency, pom, pomProperties) || foundSomething;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ public class CveDB {
|
|||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
final String msg = String.format("Error updating '%s'", vuln.getName());
|
final String msg = String.format("Error updating '%s'", vuln.getName());
|
||||||
Logger.getLogger(CveDB.class.getName()).log(Level.INFO, null, ex);
|
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
|
||||||
throw new DatabaseException(msg, ex);
|
throw new DatabaseException(msg, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,8 +374,8 @@ public class DatabaseUpdater implements CachedWebDataSource {
|
|||||||
try {
|
try {
|
||||||
currentTimestamp = Long.parseLong(prop.getProperty(LAST_UPDATED_BASE + String.valueOf(i), "0"));
|
currentTimestamp = Long.parseLong(prop.getProperty(LAST_UPDATED_BASE + String.valueOf(i), "0"));
|
||||||
} catch (NumberFormatException ex) {
|
} catch (NumberFormatException ex) {
|
||||||
Logger.getLogger(DatabaseUpdater.class.getName()).log(Level.FINEST, "Error parsing " + LAST_UPDATED_BASE
|
final String msg = String.format("Error parsing '%s' '%s' from nvdcve.lastupdated", LAST_UPDATED_BASE, String.valueOf(i));
|
||||||
+ String.valueOf(i) + " from nvdcve.lastupdated", ex);
|
Logger.getLogger(DatabaseUpdater.class.getName()).log(Level.FINEST, msg, ex);
|
||||||
}
|
}
|
||||||
if (currentTimestamp == cve.getTimestamp()) {
|
if (currentTimestamp == cve.getTimestamp()) {
|
||||||
cve.setNeedsUpdate(false); //they default to true.
|
cve.setNeedsUpdate(false); //they default to true.
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ handlers=java.util.logging.ConsoleHandler
|
|||||||
# FINEST, FINER, FINE, CONFIG, INFO, WARNING and SEVERE.
|
# FINEST, FINER, FINE, CONFIG, INFO, WARNING and SEVERE.
|
||||||
|
|
||||||
# Configure the ConsoleHandler.
|
# Configure the ConsoleHandler.
|
||||||
java.util.logging.ConsoleHandler.level=WARNING
|
java.util.logging.ConsoleHandler.level=INFO
|
||||||
|
|
||||||
org.owasp.dependencycheck.data.nvdcve.xml
|
org.owasp.dependencycheck.data.nvdcve.xml
|
||||||
|
|
||||||
# Configure the FileHandler.
|
# Configure the FileHandler.
|
||||||
#java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
|
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
|
||||||
#java.util.logging.FileHandler.level=FINEST
|
java.util.logging.FileHandler.level=FINE
|
||||||
|
|
||||||
# The following special tokens can be used in the pattern property
|
# The following special tokens can be used in the pattern property
|
||||||
# which specifies the location and name of the log file.
|
# which specifies the location and name of the log file.
|
||||||
@@ -21,4 +21,4 @@ org.owasp.dependencycheck.data.nvdcve.xml
|
|||||||
# %g - generation number for rotating logs
|
# %g - generation number for rotating logs
|
||||||
# %u - unique number to avoid conflicts
|
# %u - unique number to avoid conflicts
|
||||||
# FileHandler writes to %h/demo0.log by default.
|
# FileHandler writes to %h/demo0.log by default.
|
||||||
#java.util.logging.FileHandler.pattern=./logs/DependencyCheck%u.log
|
java.util.logging.FileHandler.pattern=./logs/DependencyCheck.log
|
||||||
Reference in New Issue
Block a user