typescript-loggable

Typescript logger lib

Usage no npm install needed!

<script type="module">
  import typescriptLoggable from 'https://cdn.skypack.dev/typescript-loggable';
</script>

README

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

}