elle-logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Elle Logger

npm version "Buy Me A Coffee"

Simple & Customizable colored logger written in Typescript

Usage

Import the library inside the file where you want to log:

import { ElleLogger } from 'elle-logger';

Declare the logger variable and, if you want, pass a configuration object.

private readonly logger = new ElleLogger({
        context: 'AppController',
        date: {
            useDate: true,
            dateFormat: 'YYYY-MM-DD HH:mm:ss'
        },
        logConfiguration: {
            error: {
                background: 'red' // or use hex code
                color: '#000'
            }
        }
    })

Enjoy.

Credits

  • LuigiElleBalotta

Package Sidebar

Install

npm i elle-logger

Weekly Downloads

2

Version

1.0.4

License

none

Unpacked Size

12.8 kB

Total Files

9

Last publish

Collaborators

  • thebbsway