1.0.6 • Published 3 years ago
q-lg v1.0.6
Q-Logger
Similar to show log in terminal or make a log file
Installation
npm install --save q-lg
Usage
const Qlog = require('q-lg');
Qlog.alert("test arlet");
Qlog.error("test error");
Qlog.info("test info");
Qlog.success("test success");
Qlog.warning("test warning");
Qlog.log("just log");
Make a file Log
Qlog.getConfig({
pathLogFile: '/Logs',
fileLogName: 'logFile.txt',
writeFile: true,
newFileEveryDay: false
});
Qlog.alert("test arlet");
Qlog.error("test error");
Qlog.info("test info");
Qlog.success("test success");
Qlog.warning("test warning");
Qlog.log("just log");
using everywhere as global
const Qlog = require('q-lg');
global.Qlog = Qlog;
// then use everywhere you want.
Qlog.alert("test arlet");
Qlog.error("test error");
Qlog.info("test info");
Qlog.success("test success");
Qlog.warning("test warning");
Qlog.log("just log");