Closed mathew-kurian closed 8 years ago
var console = scribe.console({
console : {
defaultTags : ['My default tags', {msg : 'custom default tag', color : 'inverse'}]
}
});
// or
console.addLogger('logger', 'red', {
defaultTags : ['My default tags', {msg : 'custom default tag', color : 'inverse'}]
});
//and then
console.logger('My message'); //will print the 2 default tags too
This could be an enhancement.
Do we have some news from anonymous ?
The default tags feature is implemented in #32
@guillaumewuip Thanks for the push! He has been informed. He doesn't have a git account so I posted it here. Also, I just got busy with some work but I will be working on his multithreaded logging soon; lets leave the issue open until that feature is added as well.
First of all. Thanks a lot for the wonder logging tool. Got a quick question. When I attach the logger to express logger. For every request I get logs with tags like Method, Req IP, etc. I want to automatically add those tags to each log even when a developer forgets to do .tag(). Is it possible to have global default tags. Please let me know.
Also what is your scribe-based recommendation if my app runs in multiple nodes with multiple clusters in each node.
--Anonymous