mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +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
|
// check result
|
||||||
if (responseCode != 200) {
|
if (responseCode != 200) {
|
||||||
// show errors only on full fail (all urls were not work)
|
// show errors only on full fail (all urls were not work)
|
||||||
errorsList.add("Image download for " + card.getName()
|
String info = String.format("Image download failed for %s - %s%s, http code: %d, url: %s",
|
||||||
+ (!card.getDownloadName().equals(card.getName()) ? " downloadname: " + card.getDownloadName() : "")
|
card.getSet(),
|
||||||
+ " (" + card.getSet() + ") failed - responseCode: " + responseCode + " url: " + url.toString());
|
card.getName(),
|
||||||
|
(card.getDownloadName().equals(card.getName()) ? "" : ", cardDownloadName: " + card.getDownloadName()),
|
||||||
|
responseCode,
|
||||||
|
url
|
||||||
|
);
|
||||||
|
errorsList.add(info);
|
||||||
|
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
// Shows the returned html from the request to the web server
|
// Shows the returned html from the request to the web server
|
||||||
|
|
Loading…
Reference in a new issue