@choewy/nestjs-winston
v0.0.2
Published
NestJS Winston Logger
Downloads
7
Readme
NestJS Winston
Installing
npm i @choewy/nestjs-winston
Uses
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app';
import { WinstonLoggerFactory } from './winston-logger.factory';
async function bootstrap() {
// Creates an instance of WinstonLoggerFactory
const loggerFactory = new WinstonLoggerFactory();
// Creates an LoggerService with WinstonLogger
const logger = loggerFactory.create();
const app = await NestFactory.create(AppModule, { logger });
await app.listen(3000);
}
bootstrap();