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
6.4.0 introduced a breaking type change through #1117 #1178
Comments
In any case, you should be using Line 346 in 2d52eb4
Lines 71 to 80 in 2d52eb4
|
for some historic reason our logger implements the Logger class and doesn't extend it. I've pinned our dependencies to an older version for now. I'll see if I can refactor our code. If you want you can close the issue |
The I'll leave this issue open for now and check back with you again after 2 weeks. |
const log4js = require("log4js");
log4js.configure({
appenders: {
normal: { type: 'stdout' }
},
categories: {
default: { appenders: ['normal'], level: 'info' }
}
});
const logger = log4js.getLogger();
logger.info("hello"); // String
// [2022-03-09T01:13:38.129] [INFO] default - hello
logger.log("info", "hello"); // String, String
// [2022-03-09T01:13:38.135] [INFO] default - hello
logger._log("info", "hello"); // String, String
// [2022-03-09T01:13:38.139] [info] default - h e l l o
const Level = require("log4js/lib/levels");
logger._log(Level.INFO, ["hello"]); // Level, String[]
// [2022-03-09T01:13:38.149] [INFO] default - hello |
@simhnna, did you managed to refactor? |
yeah. I refactored this. But then again 126e286 was also a change that removed an exported type. I'm currently pinning log4js due to such changes |
@simhnna, which is the removed exported type in 126e286? |
I mean the missing BaseLayout. Renaming something is like removing it. I have log4js defined as a peer dependency ( |
@simhnna, I see. Perhaps you should also rename Of course, you can also stick with the pinned version if it solves the problem. |
@simhnna, can we close the issue? |
Closed due to extended period of inactivity. |
Not sure if you're following semver or not, but this change broke our code.
Any chance we can maybe go to
_log(level: Level | string, data: any)
and internally converting strings to Level?The text was updated successfully, but these errors were encountered: