🔥🔥Logging Wrapper 🔥🔥
Have you ever tired installing the most common logging modules for your project over and over again? If yes, then this module is for you. Its just a wrapper around the most commonly used logging modules in node.js
Logging wrapper is just providing single object that will consists of all three logging modules Winston, Bunyan, and Morgan.
Usage
Winston usage
// Winston usageconst loggingWrapper = ; // Only destructure the logging lib you wantconst winston bunyan morgan = loggingWrapper; // Winston usageconst logger = winston; // if we're not in a production then log to the `console` with below format:// `${info.level}: ${info.message} JSON.stringify({ ...rest }) `if processenvNODE_ENV !== "production" logger;
Morgan usage
;// For more info, please see: https://www.npmjs.com/package/morgan)
Bunyan usage
var log = bunyan;log;// For more info, please see: https://www.npmjs.com/package/bunyan