1.0.1 • Published 3 years ago

nestjs-log-module v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

nestjs-log-module

combine winston

how use

// app.module.ts file add    impots
import { addDefaultContainer } from 'nestjs-log-module';
 LoggerModule.forRoot({
      logHttp: {},
      initWinston: async (winston) => {
        return [
          addDefaultContainer(),
        ]
      }
    }),

how join container

// addContainer id winston options
import { addContainer } from "nestjs-log-module";
addContainer("id", {});

how use at modules

import { InjectWinston, CustomLogger } from 'nestjs-log-module';
 constructor(){
    @InjectWinston() private readonly logger: CustomLogger
 }