elle-logger
v1.0.4
Published
Simple & Customizable colored logger written in Typescript
Downloads
9
Maintainers
Readme
Elle Logger
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.