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

Use NODE_DEBUG to enable debug vs. config option #12

Open
Joshsteverson opened this issue Dec 6, 2016 · 1 comment
Open

Use NODE_DEBUG to enable debug vs. config option #12

Joshsteverson opened this issue Dec 6, 2016 · 1 comment
Labels
pending-release PR has been merged. Pending release.

Comments

@Joshsteverson
Copy link

Please consider removing the winston dependency and replace with a standardized NODE_DEBUG solution. Currently winston is using the file system transport. Something like this would go to STDOUT, which would then be application concern of where to pipe STDOUT - file system being one option:

var report = ~(process.env.NODE_DEBUG || '').indexOf('sdk-node') ? true : false;
var cr = '\n';
module.exports = function debug(message) {
	if(report) process.stdout.write(message + cr);
};
@ashtru
Copy link

ashtru commented Oct 29, 2018

NODE_DEBUG is the standard for node.js internal debugging. It is not best suited for the logs of an application/library.

We already have a method to log to file, we will soon add the functionality for logging to console as well, using winston. Removing winston is not recommended, as it would be backward incompatible.

@gnongsie gnongsie added the pending-release PR has been merged. Pending release. label Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-release PR has been merged. Pending release.
Development

No branches or pull requests

3 participants