https://github.com/mattecapu/loggety-mclogface
tiny console logging util with basic coloring and tagging
https://github.com/mattecapu/loggety-mclogface
Last synced: 4 months ago
JSON representation
tiny console logging util with basic coloring and tagging
- Host: GitHub
- URL: https://github.com/mattecapu/loggety-mclogface
- Owner: mattecapu
- Created: 2016-11-08T19:03:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-03T10:01:25.000Z (about 9 years ago)
- Last Synced: 2025-10-28T05:27:55.075Z (7 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# loggety-mclogface
### tiny console logging util with basic coloring and tagging
## Installation
Do I really have to write this everytime?
```
npm install --save loggety-mclogface
```
## Usage
The package exports a single function
### `createLogFunction({ type: , color: , tag: , uppercase: , })`
* `type` *(default: 'log')*: the `console` method to invoke, any of `log`, `error`, `warn`, `info`, ...
* `color` *(default: 'blue')*: the color to use for string arguments, any supported by [`colors`](https://npmjs.com/package/colors)
* `tag` *(default: none)*: a string to prepend to every message, wrapped in square brackets (e.g: setting tag to 'foo' will print messages like `[FOO] this is a message`)
* `uppercase` *(default: true)*: transform `tag` to uppercase when set to `true`, leave it as-is otherwise
## License
MIT