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

please support print level constants #1

Closed
plainOldCode opened this issue Feb 2, 2016 · 2 comments
Closed

please support print level constants #1

plainOldCode opened this issue Feb 2, 2016 · 2 comments

Comments

@plainOldCode
Copy link
Contributor

Cannot recognize when I see number 0,1,2,3,4 ... what is level.

how about these?

print(0, 'Raw message');
print(print.RAW, 'Raw message');
// ==> Raw message
print(1, 'Debug message');
print(print.DEBUG, 'DEBUG message');
// ==> DEBUG/2015-05-07T13:55:35.612Z)
// Debug message
print(2, 'Info message');
print(print.INFO, 'INFO message');
// ==> INFO /2015-05-07T13:55:35.612Z)
// Info message
print(3, 'Warning message');
print(print.WARNING, 'WARN message');
// ==> WARN /2015-05-07T13:55:35.612Z)
// Warning message
print(4, 'Error message');
print(print.ERROR, 'ERROR message');
// ==> ERROR/2015-05-07T13:55:35.612Z)
// Error message

@Kivol
Copy link
Collaborator

Kivol commented Feb 2, 2016

I think it's too complex, and there are quite a lot of code that use print like print(4, err);.
FYI, for example, just using print(3) actually prints 3, which means one-value call is just printing with level 2.

@KnowRe
Copy link
Contributor

KnowRe commented Feb 2, 2016

Added print.XXX constant support in 1.1.0, commit 670e043.

@KnowRe KnowRe closed this as completed Feb 2, 2016
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

No branches or pull requests

3 participants