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.
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:
and here's the resulting output:
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.