Replies: 1 comment 6 replies
-
Hm...this is tricky because those logs are in the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @nartc, how can we control or disable the usage of console from the library? I'm using a NestJS app, and it completely bypasses all of my logging and is making things quite noisy. It would be great if you could control this via an environment variable or could hook it into the NestJS logging framework.
For example, at every app startup, I see something like this:
It also shows up during tests, etc. It's quite noisy, I like having the logs there for troubleshooting but don't want this going into other environments, and would like to disable it/control it. Using the native
console
in the framework is not ideal when importing this into apps. This is running before the Nest app initializes.I would prefer being able to see this voluntarily by enabling a log level or by being able to pipe these log messages to my Nest logger, etc.
I attempted to leverage the
ErrorHandler
interface and the registration in Nest, but it doesn't seem to work or hit the error.In Nest module imports:
It'd be great if you could pass a logger to this configuration in the imports or inject your logger to the ErrorHandler or something.
If this is already possible, can you please update the documentation? If not, can you please consider adding this to your roadmap?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions