mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
chore(optimise): do not initialise default appenders as it will be done again by configure()
This commit is contained in:
parent
9e751d0c14
commit
4b400523b8
@ -99,6 +99,10 @@ const createAppender = (name, config) => {
|
||||
const setup = (config) => {
|
||||
appenders.clear();
|
||||
appendersLoading.clear();
|
||||
if (!config) {
|
||||
return;
|
||||
}
|
||||
|
||||
const usedAppenders = [];
|
||||
Object.values(config.categories).forEach(category => {
|
||||
usedAppenders.push(...category.appenders);
|
||||
@ -114,7 +118,7 @@ const setup = (config) => {
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
setup({ appenders: { out: { type: 'stdout' } }, categories: { default: { appenders: ['out'], level: 'trace' } } });
|
||||
setup();
|
||||
};
|
||||
init();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user