Easy and friendly logging with timestamp
$ npm install log-log
Ready to go
var LogLog = require('log-log');
var log = LogLog.create();
log.debug("Debug some stuff");
Simple demo
var log = LogLog.create({applicationName: "Demo", color: LogLog.COLORS.CYAN});
log.debug("Hello!");
log.changeColor(LogLog.COLORS.DEFAULT);
log.error("Sample error");
log.warning("Sample warning");
log.success("Sample success");
log.test("Sample test");
logOptions
Object used to pass a few logging options, all properties are optionalapplicationName
Name given to yourLogLog
instance, useful to distinguish classes and objectscolor
You can access available colors fromLogLog.COLORS
objectdim
Default set tofalse
, useful if you don't want logs to stand out too much
create
will return a Logs
instance. This object will have the following methods
message
{String | Object}- [
depthLevel
] {Number} Optional
When passing objects they get stringified
message
{String | Object}
When passing objects they get stringified
Will affect only .debug
messages
Boolean returned
level
{Number}
You can specify debug depth level in order to filter unwanted deep debug messages
color
{String}
You can access available colors from LogLog.COLORS
object