@extended-step/logger
v1.0.1
Published
Javascript (NodeJS) package to take logs.
Downloads
2
Readme
Extended Step Logger
Javascript (NodeJS) package to take logs.
Install Package
npm i @extended-step/logger
Using Package in Project
const Logger = require("@extended-step/logger");
Logger.log({ msg: "something to log" }); // Adds to log/logs.txt in JSON format
Logger.error({ msg: "something to log" }); // Adds to log/errors.txt in JSON format
const logs = await Logger.getLogs(); // Returns array of logs in log/logs.txt
const errors = await Logger.getErrors(); // Returns array of errors in log/errors.txt