@xnestjs/rabbitmq 1.10.2 → 1.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,13 +71,13 @@ let RabbitmqCoreModule = RabbitmqCoreModule_1 = class RabbitmqCoreModule {
71
71
  useFactory: async (connectionOptions) => {
72
72
  const client = new types_js_1.RmqClient(connectionOptions.urls, connectionOptions);
73
73
  if (logger) {
74
- client.on('connect', (_, url) => {
75
- logger.error('RabbitMQ connected to ' + url);
74
+ client.on('connect', ({ url }) => {
75
+ logger.log('RabbitMQ connected to ' + url);
76
76
  });
77
- client.on('connectFailed', e => {
78
- logger.error('RabbitMQ connection failed: ' + e.message);
77
+ client.on('connectFailed', ({ err }) => {
78
+ logger.error('RabbitMQ connection failed: ' + err?.message);
79
79
  });
80
- client.on('disconnect', err => {
80
+ client.on('disconnect', ({ err }) => {
81
81
  if (err)
82
82
  logger.error('RabbitMQ client disconnected upon error. ' + err?.message);
83
83
  else
@@ -68,13 +68,13 @@ let RabbitmqCoreModule = RabbitmqCoreModule_1 = class RabbitmqCoreModule {
68
68
  useFactory: async (connectionOptions) => {
69
69
  const client = new RmqClient(connectionOptions.urls, connectionOptions);
70
70
  if (logger) {
71
- client.on('connect', (_, url) => {
72
- logger.error('RabbitMQ connected to ' + url);
71
+ client.on('connect', ({ url }) => {
72
+ logger.log('RabbitMQ connected to ' + url);
73
73
  });
74
- client.on('connectFailed', e => {
75
- logger.error('RabbitMQ connection failed: ' + e.message);
74
+ client.on('connectFailed', ({ err }) => {
75
+ logger.error('RabbitMQ connection failed: ' + err?.message);
76
76
  });
77
- client.on('disconnect', err => {
77
+ client.on('disconnect', ({ err }) => {
78
78
  if (err)
79
79
  logger.error('RabbitMQ client disconnected upon error. ' + err?.message);
80
80
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xnestjs/rabbitmq",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "NestJS extension library for RabbitMQ",
5
5
  "author": "Panates",
6
6
  "license": "MIT",