0.0.2 • Published 1 year ago
@choewy/nestjs-winston v0.0.2
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();