1.1.2 • Published 9 years ago
taglog v1.1.2
taglog
Log with tags
Installation
Install with npm.
npm install --save taglogExamples
log = require('taglog')("TAG")
log.i "hello, world"
# => I/10:33:14:9420[TAG] hello, worldAPI
Logging Levels
Supports five levels: debug, verbose, info, warn, error.
Create Logger
taglog(tag)
tagis a {String}
Methods
log.level(level)
Set the minimum log level. Default is info. Logs more verbose that the set level will be omitted.
log.colors(flag)
flagis a {Boolean} to use colors on the output.
log.(item, item...)
itemOne or more items of any time Logs the supplied items at the specified level
Aliases:
- log.debug()
- log.d()
- log.verbose()
- log.v
- log.info()
- log.i()
- log.warn()
- log.w()
- log.error()
- log.e()