mixu / minilog

Lightweight client & server-side logging with Stream-API backends
http://mixu.net/minilog/
Other
382 stars 51 forks source link

suggest.deny filter change no longer matches docs and breaks deny() #40

Open nevf opened 6 years ago

nevf commented 6 years ago

The commit https://github.com/mixu/minilog/commit/bcf518bec2ba84a430dd7b23caea32d6b1a5d01c changed the blacklist deny test from < to <= which disagrees with the docs http://mixu.net/minilog/filter.html

This configures the default filter to hide logs where the level is < 'warn'. 

I don't understand why this change was made as you can no longer use:

Minilog.suggest.deny(/mymodule\/.*/, 'debug');

to filter out debug items etc.

roark commented 5 years ago

The documentation is out of date but the ability to deny debug logs should still work.

Currently: filter.deny() will deny the log level specified and below. filter.allow() will allow the log level specified and above.

The code given should work, I've tested it locally and able to deny debug level logs. Can you post an example of the issue?