@azashi/log1
Log easily with date-time and string.
Install
npm install @azashi/log1
Usage
Has two methods,
log(str,lvl)
1. Takes string and optional parameter level as input and returns a log statement.
If lvl is given as 0
then returns undefined
.
clog(str,lvl)
2. Takes string and optional parameter level as input and prints a log on console.
If lvl is given as 0
then prints nothing.
const LogOne = require("@azashi/log1");
const output = LogOne.log("Print with date-time");
console.log(output);
// Mon Nov 25 2019 23:27:15 | Print with date-time
LogOne.clog("Directly log this");
// Sat Dec 14 2019 23:27:15 | Directly log this