-
Notifications
You must be signed in to change notification settings - Fork 776
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
Cannot find module log4js with TypeScript #1009
Labels
documentation
Improvements or additions to documentation
Milestone
Comments
this gives
|
I think this is a documentation issue. import { configure, getLogger } from "log4js";
configure("./filename");
const logger = getLogger();
logger.level = "debug";
logger.debug("Some debug messages");
configure({
appenders: { cheese: { type: "file", filename: "cheese.log" } },
categories: { default: { appenders: ["cheese"], level: "error" } }
}); I have the updated documentation below. Let me know if it works. import * as log4js from "log4js";
log4js.configure({
appenders: { cheese: { type: "file", filename: "cheese.log" } },
categories: { default: { appenders: ["cheese"], level: "error" } }
});
const logger = log4js.getLogger();
logger.level = "debug";
logger.debug("Some debug messages"); |
See #1360 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
log4js installed as dependency through npm.
tsconfig.json using module:esnext
package.json using type:module
Not working :
Current workaround:
The text was updated successfully, but these errors were encountered: