-
Notifications
You must be signed in to change notification settings - Fork 768
multiFile type is not able to use with the error: type "multiFile" could not be found #1395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same issue here, did you find a solution ? |
No, I gave up to use this log-type at that time. But still using this lib for other log-type so I'm waiting answer too. |
Can you provide a sample I created a Code: import * as log4js from "log4js";
log4js.configure({
appenders: {
cheese: { type: "file", filename: "cheese.log" },
batchLog: {
type: 'multiFile',
base: 'logs/',
property: 'categoryName',
extension: '.log'
}
},
categories: {
default: { appenders: ["cheese"], level: "error" },
batchLog: { appenders: [ 'batchLog' ], level: 'debug' }
}
});
const logger = log4js.getLogger();
logger.level = "debug";
logger.debug("Some debug messages");
const logger2 = log4js.getLogger("batchLog");
logger2.level = "debug";
logger2.debug("Some debug messages");
console.log('Hello World!'); Command: npx tsc index.ts && node index.js Output:
Directory listing: │ cheese.log
│ index.js
│ index.ts
│ package-lock.json
│ package.json
│
├───logs
│ batchLog.log
│
└───node_modules |
Hi @lamweili , sorry about late to reply. This sample installed esbuild and add npm script to reproduce: esbuild.zip > npm i
> npm start
Hello World!
> npm run esbuild
}) - appender "batchLog" is not valid (type "multiFile" could not be found) And I tried to grep It may be not your support range but I would be glad if you help us. |
Hi @lamweili I may have identified a potential source of the issue and have created a PR to fix it. Could you please review it and merge it if it is satisfactory? |
Hi @lamweili Today I have to start up new api project and I'd like to use this package too. |
I uses log4js v6.9.1 in TypeScript project with esbuild.
Already I'm using
console
anddateFile
type logging there.And I tried to use
multiFile
type then logger shows below error.I tried to copy some appenders from other issues so maybe config itself is not missed.
How can I use
multiFile
option?The text was updated successfully, but these errors were encountered: