Skip to content

Commit

Permalink
fix: Change MQTT publish log to debug (#22063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk authored Apr 3, 2024
1 parent cdd6fb0 commit bbb6f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mqtt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default class MQTT {
}

if (!skipLog) {
logger.info(`MQTT publish: topic '${topic}', payload '${payload}'`);
logger.debug(`MQTT publish: topic '${topic}', payload '${payload}'`);
}

const actualOptions: mqtt.IClientPublishOptions = {...defaultOptions, ...options};
Expand Down
2 changes: 1 addition & 1 deletion test/controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('Controller', () => {
logger.debug.mockClear();
await controller.mqtt.publish('skip-this-topic', '', {});
await MQTT.events.message('zigbee2mqtt/skip-this-topic', 'skipped');
expect(logger.debug).toHaveBeenCalledTimes(0);
expect(logger.debug).toHaveBeenCalledTimes(1);
});

it('On zigbee event message', async () => {
Expand Down

0 comments on commit bbb6f9e

Please sign in to comment.