1.5.1 • Published 3 years ago
@nest-toolbox/winston-logger v1.5.1
Winston Logger Service
NestJS LoggerService that uses Winston.
Installation
npm i @nest-toolbox/winston-logger
Example
You can pass any custom transports supported by Winston
import { NestFactory } from '@nestjs/core';
import { WinstonLoggerService } from '@nest-toolbox/winston-logger';
import { AppModule } from './app.module';
import * as winston from 'winston';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(
ApplicationModule,
{
logger: new WinstonLoggerService({
projectName: 'project',
}),
},
);
const app = await NestFactory.create<NestExpressApplication>(
ApplicationModule,
{
logger: new WinstonLoggerService({
projectName: 'project',
transports: [
new winston.transports.File({
filename: 'combined.log',
level: 'info',
}),
],
}),
},
);
await app.listen(3000);
}
bootstrap();
WinstonLoggerService constructor options
options: {
projectName: string,
transports?: any[],
timeFormatStr?: string,
customFormatter?: any
}
1.5.1
3 years ago
1.4.19
3 years ago
1.4.17
3 years ago
1.4.6
3 years ago
1.4.9
3 years ago
1.4.8
3 years ago
1.4.7
3 years ago
1.4.4
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.1.20
5 years ago
1.1.18
5 years ago
1.1.11
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago