
Platform agnostic logger for NestJS based on Pino with REQUEST CONTEXT IN EVERY LOG
LoggerModule for NestJS offers a powerful and efficient way to implement logging in your applications. With features that align seamlessly with the NestJS framework's idiomatic design, it leverages the speed and flexibility of the Pino logger, enabling developers to log in JSON format effortlessly. This module not only enhances performance but also automates the binding of request data to logs, simplifying log management across various application layers.
The configuration options, including both synchronous and asynchronous setups, provide tailored solutions for a wide range of project requirements. This combination of features makes LoggerModule an essential tool for developers who value structured logging within their NestJS applications.
JSON Logging: Leverages the Pino logger for fast logging in a highly structured JSON format, making log analysis easier.
Automatic Request/Response Logging: Automatically logs every request and response, streamlining the development process and improving debugging capabilities.
Contextual Request Data: Automatically binds request data to logs using AsyncLocalStorage, allowing for better traceability without manual context passing.
Flexible Configuration: Supports both synchronous and asynchronous configuration, enabling integration with modules like ConfigModule for enhanced flexibility.
Asynchronous Logging: Boosts performance through asynchronous logging capability with Pino, allowing log processing without blocking the main application thread.
Mockable Logger: Provides a getLoggerToken() function to facilitate easy mock implementations for testing purposes using standard NestJS provider techniques.
Extended Logger Classes: The Logger and PinoLogger classes can be extended for customized logging functionalities catered to specific application needs.
Easy Integration: A straightforward setup process requiring only the importation of LoggerModule into your root module makes it convenient to implement.

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.
ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.
TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.