Moved the curl formatting into the log and changed the arguments for the log event listeneres to

receive both the "message" and the "curlCommand".

Added a "tracer" logger which allows you to create log files that a executable scripts. Those scripts
will write all of the log messages as script comments, and not comment out the curlCommands, so that they
can trace their application and use the generated script to recreate the issue.

Most changes are simply cased by adding the "unused" rule to jshint.
This commit is contained in:
Spencer Alger
2013-11-15 19:10:45 -07:00
parent 20804bb5ab
commit 5bb70fbe58
32 changed files with 185 additions and 229 deletions

View File

@ -32,6 +32,7 @@ if (typeof XMLHttpRequest !== 'undefined') {
} else {
// find the first MS implementation available
getXhr = _.first(['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], function (appName) {
/* jshint unused: false */
try {
var test = new window.ActiveXObject(appName);
return function () {
@ -61,7 +62,7 @@ XhrConnector.prototype.request = function (params, cb) {
xhr.open(params.method, url, async);
}
xhr.onreadystatechange = function (e) {
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
clearTimeout(timeoutId);
log.trace(params.method, url, params.body, xhr.responseText, xhr.status);