Gathering detailed insights and metrics for nestjs-winston-logger
Gathering detailed insights and metrics for nestjs-winston-logger
Gathering detailed insights and metrics for nestjs-winston-logger
Gathering detailed insights and metrics for nestjs-winston-logger
nest-winston
A Nest module wrapper for winston
@trxn/nestjs-winston
This library is intend to provide some helpful function to work with the stack's logger and winston. Be sure to read the logger documentation before to read this doc.
@infineit/winston-logger
Enterprise-level logger integration package
@uncompa17/nestjs-logger
A logging library for NestJS using Winston and customizable log levels and more
A logger integrating winston and wrapped by nestjs
npm install nestjs-winston-logger
Typescript
Module System
Node Version
NPM Version
51.3
Supply Chain
59.5
Quality
67.4
Maintenance
25
Vulnerability
97
License
TypeScript (91.31%)
JavaScript (8.69%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
16 Stars
60 Commits
8 Forks
3 Watchers
3 Branches
2 Contributors
Updated on Nov 12, 2024
Latest Version
1.1.11
Package Id
nestjs-winston-logger@1.1.11
Unpacked Size
196.91 kB
Size
63.22 kB
File Count
58
NPM Version
8.1.2
Node Version
16.13.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Nest framework TypeScript starter repository.
1$ yarn add nestjs-winston-logger
1import { NestFactory } from "@nestjs/core"; 2import { AppModule } from "./app.module"; 3import { 4 NestjsWinstonLoggerService, 5 appendRequestIdToLogger, 6 LoggingInterceptor, 7 morganRequestLogger, 8 morganResponseLogger, 9 appendIdToRequest 10} from "nestjs-winston-logger"; 11 12import { format, transports } from "winston"; 13import * as helmet from "helmet"; 14 15async function bootstrap() { 16 const app = await NestFactory.create(AppModule); 17 app.use(helmet()); 18 19 const globalLogger = new NestjsWinstonLoggerService({ 20 format: format.combine( 21 format.timestamp({ format: "isoDateTime" }), 22 format.json(), 23 format.colorize({ all: true }), 24 ), 25 transports: [ 26 new transports.File({ filename: "error.log", level: "error" }), 27 new transports.File({ filename: "combined.log" }), 28 new transports.Console(), 29 ], 30 }); 31 app.useLogger(globalLogger); 32 33 // append id to identify request 34 app.use(appendIdToRequest); 35 app.use(appendRequestIdToLogger(globalLogger)); 36 37 app.use(morganRequestLogger(globalLogger)); 38 app.use(morganResponseLogger(globalLogger)); 39 40 app.useGlobalInterceptors(new LoggingInterceptor(globalLogger)); 41 42 const port = process.env.PORT || 4000; 43 await app.listen(port).then(() => { 44 console.log(`🚀 Server ready at ${port}`); 45 }); 46} 47bootstrap();
Inside demo.module.ts
1import { Module } from "@nestjs/common"; 2import { NestjsWinstonLoggerModule } from "nestjs-winston-logger"; 3import { format, transports } from "winston"; 4import { DemoService } from "./demo.service"; 5 6@Module({ 7 imports: [ 8 NestjsWinstonLoggerModule.forRoot({ 9 format: format.combine( 10 format.timestamp({ format: "isoDateTime" }), 11 format.json(), 12 format.colorize({ all: true }), 13 ), 14 transports: [ 15 new transports.File({ filename: "error.log", level: "error" }), 16 new transports.File({ filename: "combined.log" }), 17 new transports.Console(), 18 ], 19 }), 20 ], 21 providers: [DemoService], 22}) 23export class DemoModule {}
Inside demo.service.ts
1import { Injectable } from "@nestjs/common"; 2import { NestjsWinstonLoggerService, InjectLogger } from "nestjs-winston-logger"; 3 4@Injectable() 5export class DemoService { 6 constructor(@InjectLogger(DemoService.name) private logger: NestjsWinstonLoggerService) {} 7}
Nest is MIT licensed.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
35 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More