1.0.1 • Published 9 years ago
loggety-mclogface v1.0.1
loggety-mclogface
tiny console logging util with basic coloring and tagging
Installation
Do I really have to write this everytime?
npm install --save loggety-mclogfaceUsage
The package exports a single function
createLogFunction({ type: <string>, color: <string>, tag: <string>, uppercase: <bool>, })
type(default: 'log'): theconsolemethod to invoke, any oflog,error,warn,info, ...color(default: 'blue'): the color to use for string arguments, any supported bycolorstag(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): transformtagto uppercase when set totrue, leave it as-is otherwise
License
MIT