Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic logger to an existing nestjs project #49

Open
inigomarquinez opened this issue Mar 22, 2023 · 0 comments
Open

Add basic logger to an existing nestjs project #49

inigomarquinez opened this issue Mar 22, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@inigomarquinez
Copy link
Contributor

inigomarquinez commented Mar 22, 2023

Nest comes with a built-in text-based logger which is used during application bootstrapping and several other circumstances such as displaying caught exceptions (i.e., system logging). This functionality is provided via the Logger class in the @nestjs/common package.

But you can provide a custom logger implementation to be used by Nest for system logging by setting the value of the logger property to an object that fulfills the LoggerService interface. We can use this feature to improve the logging system.

We may also include a middleware to log the HTTP requests. e.g. morgan

NestJS documentation.

https://docs.nestjs.com/techniques/logger

@inigomarquinez inigomarquinez added the enhancement New feature or request label Mar 22, 2023
@inigomarquinez inigomarquinez modified the milestones: 2023 Q2, 2023 Q3 Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant