- Download the most current release and unzip the archive.
- Copy the file
js/log4js.min.jsto your project.
- Add script for instantiation of Logger:
let consoleLog = new Log4js.Logger("consoleTest"); consoleLog.setLevel(Log4js.Level.ALL); let consoleAppender = new Log4js.ConsoleAppender(true); consoleLog.addAppender(consoleAppender);
- Then you are able to add logging event:
consoleLog.trace('I was traced!')
Within sources there is a more detailed example.
cd log4js npm install grunt build
Include then the
target/log4js.min.js file in your project.
More details in the Wiki
The servlet is Java based project which is compiled using
Pull Requests are very welcome.
There is a very active fork of current log4js framework modified for node.js usage: https://github.com/nomiddlename/log4js-node
Further loggers could be found (and added!) in the Wiki.