Skip to content

Commit

Permalink
a couple of small logging tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nrabinowitz committed Aug 4, 2011
1 parent 9eaeda8 commit 1aa5db6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pjscrape.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

/*
TODO:
- Get the HTTP response code for the loaded page and fail if it's 40x or 50x
- tests for client utilities?
- docs for the Logger, Formatter, Writer, and HashFunction interfaces?
- test for file writes
Expand Down Expand Up @@ -391,6 +392,7 @@ var pjs = (function(){
filename = fileparts.join('.') + '-' + (count++) + '.' + ext;
}
phantom.saveToFile(formatter.format(item), filename, 'w');
count++;
});
}
};
Expand Down Expand Up @@ -469,7 +471,7 @@ var pjs = (function(){
var page = new WebPage();
// set up console output
page.onConsoleMessage = function(msg, line, id) {
id = id || 'pjscrape.js or injected code';
id = id || 'injected code';
if (line) msg += ' (' + id + ' line ' + line + ')';
log.msg('CLIENT: ' + msg);
};
Expand Down

0 comments on commit 1aa5db6

Please sign in to comment.