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