Closed Philmod closed 10 years ago
mute()
should work for this.
// myModule/tests/test.js
var log = require('logule').init(module, 'tests').mute('info');
var myModule = require('../');
I'm using require('logule').init(module, '...')
for my modules in my code, but I want to suppress these logs when I run my tests (npm test
).
Does it make sense?
Yeah, you just got to require logule in the main file that npm test
runs. That will mute everything below, that being the module you are testing.
Cool, thanks.
On 28 April 2014 16:31, Eirik Albrigtsen notifications@github.com wrote:
Yeah, you just got to require logule in the main file that npm test runs. That will mute everything below, that being the module you are testing.
— Reply to this email directly or view it on GitHubhttps://github.com/clux/logule/issues/19#issuecomment-41626976 .
Philippe Modard 415-722-1245 philippe.modard@gmail.com philippe.modard@modygo.com twitter.com/philmod re.vu/philippemodard www.linkedin.com/in/philippemodard IBAN BE70 0639 3284 8025 - BIC: GKCCBEBB
Hey man,
I want to suppress
info
logs when I run my tests, is there an easy way to have separate.logule.json
or even turn them off in my code?Thanks, Philmod