Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.35 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.35 KB

@eltacitos/tiny-logger

npm (scoped) NPM Downloads NPM Downloads

Just a tiny npm package to log in typescript with color.

Install

$ npm i @eltacitos/tiny-logger

Functions

🟥 logger.error(str: string, ...args:any[]) logger.red(str: string, ...args:any[]) 🟥

🟨 logger.info(str: string, ...args:any[]) logger.yellow(str: string, ...args:any[]) 🟨

🟦 logger.debug(str: string, ...args:any[]) logger.blue(str: string, ...args:any[]) 🟦

🟩 logger.test(str: string, ...args:any[]) logger.green(str: string, ...args:any[]) 🟩

🟪 logger.warning(str: string, ...args:any[]) logger.purple(str: string, ...args:any[]) 🟪

Usage

import {logger} from "@eltacitos/tiny-logger/lib";

logger.error("hwB0EkOZ", {demo:"ECr8Jo9o"})
/*
[Error:2021-12-30 05:34:50] hwB0EkOZ 
{
    "demo": "ECr8Jo9o"
} 
*/


logger.cyan("2Id1Wov", ["DafkHU","xWv"])
/*
[Cyan:2021-12-30 05:34:50] 2Id1Wov 
[
    "DafkHU",
    "xWv"
]

*/