Skip to content

🖍 Package to style the logs of your codes and terminals

Notifications You must be signed in to change notification settings

escabora/color-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Downloads Total License CodeFactor

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-package

Usage

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:

default


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:

custom

Use our list below to find out what color and style parameters you can use:

parameter output
Reset Reset
Bright Bright
Dim Dim
Underscore Underscore
Blink Blink
Reverse Reverse
Hidden Hidden
FgBlack FgBlack
FgRed FgRed
FgGreen FgGreen
FgYellow FgYellow
FgBlue FgBlue
FgMagenta FgBlue
FgCyan FgCyan
FgWhite FgWhite
FgGray FgGray
BgBlack BgBlack
BgGreen BgGreen
BgYellow BgYellow
BgBlue BgBlue
BgMagenta BgMagenta
BgCyan BgCyan
BgWhite BgWhite
BgGray BgGray

License

The code is available under the MIT License.

About

🖍 Package to style the logs of your codes and terminals

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published