Very simple console logging API
npm install ls-logger --save
// TypeScript 1.6+
import logger = require("ls-logger");
// JavaScript
var logger = require("ls-logger");
var fs = require("fs");
logger.debug("a debug message");
logger.info("an information message");
logger.warn("a warning message");
logger.error("an error message");
/**
* Add your own event listeners to events
*/
logger.on("info", msg => fs.appendFile('myapp.log', msg));
debug
info
warn
error