mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Refactor: improved images download logs
This commit is contained in:
parent
af5d8fae9d
commit
6200b43a8d
1 changed files with 8 additions and 3 deletions
|
@ -904,9 +904,14 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
|
|||
// check result
|
||||
if (responseCode != 200) {
|
||||
// show errors only on full fail (all urls were not work)
|
||||
errorsList.add("Image download for " + card.getName()
|
||||
+ (!card.getDownloadName().equals(card.getName()) ? " downloadname: " + card.getDownloadName() : "")
|
||||
+ " (" + card.getSet() + ") failed - responseCode: " + responseCode + " url: " + url.toString());
|
||||
String info = String.format("Image download failed for %s - %s%s, http code: %d, url: %s",
|
||||
card.getSet(),
|
||||
card.getName(),
|
||||
(card.getDownloadName().equals(card.getName()) ? "" : ", cardDownloadName: " + card.getDownloadName()),
|
||||
responseCode,
|
||||
url
|
||||
);
|
||||
errorsList.add(info);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
// Shows the returned html from the request to the web server
|
||||
|
|
Loading…
Reference in a new issue