better logging messages
Showing
1 changed file
with
6 additions
and
1 deletions
... | @@ -580,7 +580,12 @@ | ... | @@ -580,7 +580,12 @@ |
580 | }; | 580 | }; |
581 | page.onLoadFinished = function(status) { | 581 | page.onLoadFinished = function(status) { |
582 | if (status !== "success") { | 582 | if (status !== "success") { |
583 | casper.log('Loading resource failed with status=' + status + ': ' + casper.requestUrl, "info"); | 583 | var message = 'Loading resource failed with status=' + status; |
584 | if (casper.currentHTTPStatus) { | ||
585 | message += ' (HTTP ' + casper.currentHTTPStatus + ')'; | ||
586 | } | ||
587 | message += ': ' + casper.requestUrl; | ||
588 | casper.log(message, "warning"); | ||
584 | } | 589 | } |
585 | if (casper.options.clientScripts) { | 590 | if (casper.options.clientScripts) { |
586 | for (var i = 0; i < casper.options.clientScripts.length; i++) { | 591 | for (var i = 0; i < casper.options.clientScripts.length; i++) { | ... | ... |
-
Please register or sign in to post a comment