basic-node-logger
v1.0.1
Published
A basic Node.js logger with simple configuration
Downloads
189
Readme
basic-node-logger
A basic logger for Node.js applications that was influenced by the standard logging in Java-Spring.
Installation
npm install basic-node-loggerHow to use
Simply create a logger instance and use it to log messages at various levels optionally including custom configuration and/or supplying a request ID.
import { BasicLogger } from "basic-node-logger";
const logger = new BasicLogger({
name: "myApp",
logLevel: "TRACE",
});
logger.fatal("This is a fatal message");
logger.error("This is an error message");
logger.warn("This is a warning message");
logger.info("This is an info message");
logger.debug("This is a debug message");
logger.trace("This is a trace message");The output of the above commands will look like this:

