typescript-loggable
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Typescript-loggable

npm version Build Status

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');
    }

}

Package Sidebar

Install

npm i typescript-loggable

Weekly Downloads

1

Version

2.0.2

License

none

Unpacked Size

83.6 kB

Total Files

20

Last publish

Collaborators

  • biharck