mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
updated logging
This commit is contained in:
@@ -389,7 +389,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
|
||||
try {
|
||||
fis = new FileInputStream(archive);
|
||||
} catch (FileNotFoundException ex) {
|
||||
final String msg = String.format("Error extracting file `%s`: %s", archive.toString(), ex.getMessage());
|
||||
final String msg = String.format("Error extracting file `%s`: %s", archive.getAbsolutePath(), ex.getMessage());
|
||||
LOGGER.debug(msg, ex);
|
||||
throw new AnalysisException(msg);
|
||||
}
|
||||
|
||||
@@ -976,7 +976,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
||||
final String[] l = tempFileLocation.list();
|
||||
if (l != null && l.length > 0) {
|
||||
LOGGER.warn("Failed to delete the JAR Analyzder's temporary files from `{}`, "
|
||||
+ "see the log for more details", tempFileLocation.toString());
|
||||
+ "see the log for more details", tempFileLocation.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,11 +139,11 @@ public final class ExtractionUtil {
|
||||
extractArchive(new ZipArchiveInputStream(new BufferedInputStream(
|
||||
fis)), destination, filter);
|
||||
} catch (FileNotFoundException ex) {
|
||||
final String msg = String.format("Error extracting file `%s` with filter: %s",archive.toString(), ex.getMessage());
|
||||
final String msg = String.format("Error extracting file `%s` with filter: %s", archive.getAbsolutePath(), ex.getMessage());
|
||||
LOGGER.debug(msg, ex);
|
||||
throw new ExtractionException(msg);
|
||||
} catch (IOException | ArchiveExtractionException ex) {
|
||||
LOGGER.warn("Exception extracting archive '{}'.", archive.getName());
|
||||
LOGGER.warn("Exception extracting archive '{}'.", archive.getAbsolutePath());
|
||||
LOGGER.debug("", ex);
|
||||
throw new ExtractionException("Unable to extract from archive", ex);
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ public final class FileUtils {
|
||||
if (!tempDir.mkdirs()) {
|
||||
throw new IOException("Could not create temp directory `" + tempDir.getAbsolutePath() + "`");
|
||||
}
|
||||
LOGGER.debug("Temporary directory is `{}`", tempDir.getAbsolutePath());
|
||||
return tempDir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user