color-log-package
v1.0.5
Published
Package to style the logs of your codes and terminals
Maintainers
Readme
Color Log Package
The creation of this package is to help identify precious logs in applications
Installation
yarn add color-log-package
//- or
npm install color-log-packageUsage
There are two ways to use this package. The first way to use our aliases is to be fast and responsive.
import log from 'color-log-package'
const data = { key: 'test' }
log('Success', data)
log('Warning', data)
log('Error', data)Output:
The second you can define the color, the styles and the message that will be displayed. Just passing an array with the styles you want
import log from 'color-log-package'
const data = { key: 'test' }
const setupColor = ['BgBlue', 'Bright', 'FgWhite'];
log('Test Custom Log', data, setupColor);
Output:
Use our list below to find out what color and style parameters you can use:
| parameter | output |
|-------------- |-------- |
| Reset |
|
| Bright |
|
| Dim |
|
| Underscore |
|
| Blink |
|
| Reverse |
|
| Hidden |
|
| FgBlack |
|
| FgRed |
|
| FgGreen |
|
| FgYellow |
|
| FgBlue |
|
| FgMagenta |
|
| FgCyan |
|
| FgWhite |
|
| FgGray |
|
| BgBlack |
|
| BgGreen |
|
| BgYellow |
|
| BgBlue |
|
| BgMagenta |
|
| BgCyan |
|
| BgWhite |
|
| BgGray |
|
License
The code is available under the MIT License.
