indent-logger
v1.0.4
Published
Console.log with indent option
Downloads
2
Readme
indent-logger
Console.log with indent option
Installation
$ npm install indent-logger
Usage
Using indent
const logger = require('indent-logger');
logger.indent(2, "Some text");
logger.indent(4, "Some text two");
logger.indent(6, "Some text three");
console.log("Some text");
console.log("Some text two");
console.log("Some text three");
# output
Some text
Some text two
Some text three
Some text
Some text two
Some text three
Using indentTimestamp
const logger = require('indent-logger');
logger.indentTimestamp(2, "Some text");
logger.indentTimestamp(4, "Some text two");
console.log("Some text");
console.log("Some text two");
# output
2018-8-20 10:32:43 -> Some text
2018-8-20 10:32:43 -> Some text two
Some text
Some text two
Using timestamp
const logger = require('indent-logger');
logger.timestamp(2, "Some text");
console.log("Some text");
# output
2018-8-20 10:32:43 -> Some text
Some text
That's it. Happy coding!