1.7.0 • Published 4 years ago
nestjs-extended-logger v1.7.0
nestjs-extended-logger
This module extends the default NestJS logger to provide additional information can customization options. Logging details are added to all mutations, queries, and routes.
To install
- Import IntegratedLoggerService and IntegratedLoggerInterceptor from 'nestjs-extended-logger'
main.ts
import {
IntegratedLoggerService,
IntegratedLoggerInterceptor,
} from 'nestjs-extended-logger';
- Assign the logger to the IntegratedLogger
main.ts
const logger = app.get<IntegratedLoggerService>(IntegratedLoggerService);
- Implement the global interceptor for routes, queries, and mutations
main.ts
app.useGlobalInterceptors(new IntegratedLoggerInterceptor(logger));
- Connect the logger to other Modules if additional or specific logging is needed using dependency injection.
To Contribute
The repo is set up with semantic UI to do automatic versioning. On PRs to master, the commit message needs to be prefixed with 'fix:', 'feat:', or other flag using the the AngularJS commit conventions to automatically bump the version and publish.