0.1.1 • Published 8 years ago
logboom v0.1.1
logboom — 
clearcut simple node logging
install logboom locally —
npm install logboomimport and instantiate a logger
import {FileLogger} from "logboom" const logger = new FileLogger({logfile: "example.log", level: "silly"})do some logging
logger.error(new Error("an error occurred")) logger.warn("heed my warning!") logger.info("something informative") logger.verbose("explaining what's happening verbosely") logger.debug("information to help diagnose bugs") logger.silly("obscenely fine-grained details")voila! color-coded console output

you also get a color-free
example.logtext file
notes
the
ConsoleLoggerclass writes to stdout and stderrthe
FileLoggeris really double-logger
it extends the console logger and writes to the console — but also writes to a text file (with the colors stripped out)alternatively, you can just use the ConsoleLogger, and then redirect the stdout/stderr output with unix stuff:
node myapp 2>&1 | tee -a example.log
if that's not your jam, just use the file logger