Closed irarayjenkins closed 6 days ago
@irarayjenkins There may be multiple approaches to address this, one being you override Nestjs logger and proxy error
calls but I feel that it could end up being hacky.
Alternatively, we could support a new option that enables you to control the LogLevel
.
If anyone's able to help with this enhancement I would appreciate :pray:
You can override the logger by providing logger
https://github.com/golevelup/nestjs/blob/9ea5b3e3e7dceb1dcea9aca233ed306a15d3bb81/packages/rabbitmq/src/amqp/connection.ts#L228
A client application can use a custom logger, and properly pass that into this library and then correctly observe the relevant logs. Since this library uses
ampq-connection-manager
to support connection resiliency, auto-reconnect, and message queueing... are these logs produced ondisconnect
actually errors?I wonder if there is a way for a client application to configure this behavior to either avoid these logs completely and implement their own
.on('disconnect', ... )
or to consider changing these to warnings or info/log?One option of course, would be a custom logger just for this library that either consumes the logs or de-escalates
error
to awarn
?