https://github.com/venkatperi/taglog
https://github.com/venkatperi/taglog
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/venkatperi/taglog
- Owner: venkatperi
- Created: 2016-05-24T02:39:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-26T19:40:20.000Z (almost 9 years ago)
- Last Synced: 2024-04-24T20:42:57.143Z (about 1 year ago)
- Language: CoffeeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# taglog
Log with tags# Installation
Install with npm.```shell
npm install --save taglog
```# Examples
```coffeescript
log = require('taglog')("TAG")log.i "hello, world"
# => I/10:33:14:9420[TAG] hello, world
```# API
## Logging Levels
Supports five levels: `debug`, `verbose`, `info`, `warn`, error.## Create Logger
### taglog(tag)
* `tag` is 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)
* `flag` is a {Boolean} to use colors on the output.### log.(item[, item...])
* `item` One 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()