typescript-loggable
v2.0.2
Published
Typescript logger lib
Downloads
10
Maintainers
Readme
Typescript-loggable
typescript-loggable
is a tool which encapsulates Winston making it cleaner and simple to be used.
Usage
import { Logger } from 'typescript-loggable';
const logger = new Logger();
logger.error('this is my error log');
You can also inject the logger using typescript-ioc (Kudos to Thiago Bustamante):
import { Inject } from 'typescript-ioc';
import { Logger } from 'typescript-loggable'
export class MyLogClass {
@Inject
private logger: Logger;
public myLogger(){
this.logger.error('error log content');
}
}