-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
feature request: RabbitMQ module support custom logger through DI #607
Comments
@Hareloo Nestjs is a peer dependency just asking for |
Here's a reproduction: https://github.com/Hareloo/repro270623 |
Thanks, as soon as i can I'll give it a shot and investigate |
@Hareloo So it looks like our logger is being created statically, meaning it doesn't rely on the DI logger. I think we would have to support receiving the logger through the constructor so that it could be initialized using the right factory. Right now I don't have enough time to develop such a feature as I'm not also using the rabbitmq module anymore but if you're willing to push such feature I'll be happy to review and push |
Seems like this would be more complicated than you suggested, since all the packages of |
@Hareloo We might have to support v10 then first if you're willing to contribute that otherwise once I have some free time I'll push the peer to support v10 |
@underfisk Alright, after it's merged I will test again (since when I'm using NestJS v9 my custom logger does work) and see if maybe that was enough to solve this. |
Fixed now, I guess the logger couldn't initialize correctly due to mismatch in nestjs versions. |
Currently, I am not sure if this package supports NestJS v10.
I am seeing one weird behavior which is that every log from the logger within
rabbitmq.module.ts
(private readonly logger = new Logger(RabbitMQModule.name);
at line 67) seems to not go to the logger instance I passed but rather goes to the default logger of NestJS...The text was updated successfully, but these errors were encountered: