Skip to content

rostik1410/LogPrettier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console logs Prettier

Instalation:

npm i log-prettier

Using:

import { logger } from 'log-prettier';

logger.info('SomeParams', someParams);
logger.debug('SomeParams', someParams);
logger.warn('SomeParams', someParams);
logger.error('SomeParams', someParams);

Supporting any params count and format same which console logs.

Customization:

Custom Config:
Params Description
infoBackgroundColor Background color for info label (supports HTML/CSS color names, hex (with #), and rgba colors)
infoTitle Text for info label (could contain emoji)
debugBackgroundColor Background color for debug label (supports HTML/CSS color names, hex (with #), and rgba colors)
debugTitle Text for debug label (could contain emoji)
warnBackgroundColor Background color for warn label (supports HTML/CSS color names, hex (with #), and rgba colors)
warnTitle Text for warn label (could contain emoji)
warnTracebackOn Show warn traceback as console.warn or just show data (default is false)
errorBackgroundColor Background color for error label (supports HTML/CSS color names, hex (with #), and rgba colors)
errorTitle Text for error label (could contain emoji)
errorTracebackOn Show error traceback as console.error or just show data (default is false)
Using:
import { logger } from 'log-prettier';

logger.init({
	someParam: customValue,
});

Preview:

alt text

About

Prettier for console logs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published