Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better debug output #15

Merged
merged 3 commits into from
Mar 31, 2015
Merged

Better debug output #15

merged 3 commits into from
Mar 31, 2015

Conversation

rahulpatel
Copy link
Contributor

The debug output is pretty printing the json output which isn't ideal when you're trying to write to log files in environments other than development. So this change hands the pretty printing responsibility over to the logging function. The library itself will pass the logging function an object containing the same information it was logging individually.

Rather than logging strings, pass around a debug object that'll contain all of the same information. Print that object once at times.
request: soapRequest
}
};
if (coreSettings.debugSoap) coreSettings.logger(debug);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should be doing this log here as it'll just get duplicated above but it'll be useful to have it just incase requests never make it back for some odd reason. What do others think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no requests are making it back, we'll have a pretty obvious problem, if it's only some I don't think it'll be obvious from the log output which ones (all the successes log this too, so there'll be a steady baseline amount of output/noise from this line)

@shackpank
Copy link
Member

+1

@stuartstobie
Copy link

Looks good 👍

rahulpatel pushed a commit that referenced this pull request Mar 31, 2015
@rahulpatel rahulpatel merged commit 5f7b93b into master Mar 31, 2015
@rahulpatel rahulpatel deleted the better-output branch March 31, 2015 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants