mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 09:31:32 +01:00
added logging of URL
This commit is contained in:
@@ -25,6 +25,8 @@ import java.util.Map.Entry;
|
|||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
||||||
import org.owasp.dependencycheck.utils.Downloader;
|
import org.owasp.dependencycheck.utils.Downloader;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains a collection of updateable NvdCveInfo objects. This is used to determine which files need to be downloaded and
|
* Contains a collection of updateable NvdCveInfo objects. This is used to determine which files need to be downloaded and
|
||||||
@@ -34,6 +36,7 @@ import org.owasp.dependencycheck.utils.Downloader;
|
|||||||
*/
|
*/
|
||||||
public class UpdateableNvdCve implements Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {
|
public class UpdateableNvdCve implements Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(UpdateableNvdCve.class);
|
||||||
/**
|
/**
|
||||||
* A collection of sources of data.
|
* A collection of sources of data.
|
||||||
*/
|
*/
|
||||||
@@ -91,6 +94,7 @@ public class UpdateableNvdCve implements Iterable<NvdCveInfo>, Iterator<NvdCveIn
|
|||||||
item.setId(id);
|
item.setId(id);
|
||||||
item.setUrl(url);
|
item.setUrl(url);
|
||||||
item.setOldSchemaVersionUrl(oldUrl);
|
item.setOldSchemaVersionUrl(oldUrl);
|
||||||
|
LOGGER.debug("Checking for updates from: {}", url);
|
||||||
item.setTimestamp(Downloader.getLastModified(new URL(url)));
|
item.setTimestamp(Downloader.getLastModified(new URL(url)));
|
||||||
collection.put(id, item);
|
collection.put(id, item);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user