Is it possible to have subcategories?
if I use this config.json:
{
"appenders": [
{
"category": "main",
// rest of the configuration for this appender
},
{
"category": "main.child",
// rest of the configuration for this appender
}
]
}
And have the following code:
var log4js = require('log4js');
var mainLogger = log4js.getLogger('main');
var childLogger = log4js.getLogger('main.child');
var ignoredLogger = log4js.getLogger('main.ignored');
mainLogger.warn("This message is processed according to 'main' category appender");
childLogger.warn("This message is processed according to 'main.child' category appender");
ignoredLogger.warn("This message is ignored");
I would expect that the ignoredLogger message would be processed by the 'main' logger, as 'main.ignored' category is a subcategory of 'main' and there is no specific configuration for 'main.ignored'.
Is there some way to accomplish this?
Is it possible to have subcategories?
if I use this config.json:
And have the following code:
I would expect that the ignoredLogger message would be processed by the 'main' logger, as 'main.ignored' category is a subcategory of 'main' and there is no specific configuration for 'main.ignored'.
Is there some way to accomplish this?