You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified the themes example to add some filters to block the debug level messages but I can't seem to make them work. Presumably I'm doing something wrong but it seems pretty straightforward so I'm confused. Here's the code:
var log = require('minilog')('app'),
ConsoleBackend = require('minilog').backends.console;
function out() {
log
.debug('debug message')
.info('info message')
.warn('warning')
.error('this is an error message');
};
var minilog = require('minilog');
console.log('\n== Default style\n');
minilog.enable();
var filter = new minilog.Filter();
filter.defaultResult = true;
filter.deny('app','debug');
minilog.pipe(filter);
out();
minilog.disable();
});
and here's the resulting output:
== Default style
app debug debug message
app info info message
app warn warning
app error this is an error message
I also tried just setting defaultResult to false and using allow rules but without success - all the messages seem to come through no matter what I try.
Activity
duffar commentedon Jul 24, 2018
I also tried using the suggest mechanism instead of filter by doing this right before the enable()
again everything still comes through.
duffar commentedon Jul 24, 2018
I found I could get things working by using the suggest.deny rules. For now I can work with that.