loggety-mclogface
v1.0.1
Published
tiny console logging util with basic coloring and tagging
Downloads
4
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: <string>, color: <string>, tag: <string>, uppercase: <bool>, })
type
(default: 'log'): theconsole
method to invoke, any oflog
,error
,warn
,info
, ...color
(default: 'blue'): the color to use for string arguments, any supported bycolors
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): transformtag
to uppercase when set totrue
, leave it as-is otherwise
License
MIT