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

Ordering of log levels? #25

Open
bhmevik opened this issue Jul 14, 2016 · 1 comment
Open

Ordering of log levels? #25

bhmevik opened this issue Jul 14, 2016 · 1 comment

Comments

@bhmevik
Copy link

bhmevik commented Jul 14, 2016

I really like the fact that this package captures messages from message(), warning() and stop(). IMO it is a potential killer feature.

However, I miss a simple way to specify that "I want to log all messages of level INFO or higher", etc. As I understand it, currently, one has to specify all levels explicitly in the log_file() call. It would be very useful if the levels were ordered, for instance DEBUG > INFO > (SIMPLE)MESSAGE > WARN = SIMPLEWARNING > ERROR > SIMPLEERROR = CRITICAL.
Other logging systems I've seen do this by assigning a numerical value to each symbolic log level, and then test for >= num_log_level. Would it be possible to implement something like this in loggr? I think it would be very useful, and it would also make it easy to add custom log levels.

@smbache
Copy link
Owner

smbache commented Jul 23, 2016

Good point.

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

2 participants