oo-logger
v0.0.2
Published
Simple File Logger
Downloads
4
Readme
oo-logger
Simple file logger
Installation
npm install oo-logger
Usage
var Logger = require("oo-logger");
var debug = Logger.create("./debug.txt", debug);
debug.log("a message");
debug.trace();
Logger(name)
Retrieve a logger by name
Logger.create(path, name)
Create a new logger
- �path` Path to file
name
Optional name of logger
logger.log(message)
Print a message
logger.inspect(object, depth)
Print an object
depth
Maximum recurse depth for large objects (defaults to 3)
logger.trace()
Print stack trace
logger.error(error)
Print error message
logger.close(message)
Print message and close logger
A logger automatically closes when process exits