logger
Probably the simplest logger out there.
How to Use it
let logger = new Logger("App", {
level: Logger.level.debug,
timestamp: {
state: true,
format: Logger.timestamp.utc
},
output: {
console: true,
file: './log.txt'
}
});
logger.debug("Initializing");
API
logger.verbose("verbose log");
logger.debug("debug log");
logger.info("info log");
logger.warning("warning log");
logger.error("error log");
logger.log("hello", "debug");
logger.log("hello again", Logger.level.debug);
logger.disable();
logger.enable();
logger.setLevel("info");
Node
Install with node package manager
npm install @voliware/logger
Include in a file
const Logger = require('@voliware/logger');
Browser
Include in a file
<script src="https://cdn.jsdelivr.net/npm/@voliware/logger/dist/logger.min.js"></script>