Skip to content

Commit bbb6f9e

Browse files
authored
fix: Change MQTT publish log to debug (#22063)
1 parent cdd6fb0 commit bbb6f9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/mqtt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export default class MQTT {
181181
}
182182

183183
if (!skipLog) {
184-
logger.info(`MQTT publish: topic '${topic}', payload '${payload}'`);
184+
logger.debug(`MQTT publish: topic '${topic}', payload '${payload}'`);
185185
}
186186

187187
const actualOptions: mqtt.IClientPublishOptions = {...defaultOptions, ...options};

test/controller.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ describe('Controller', () => {
280280
logger.debug.mockClear();
281281
await controller.mqtt.publish('skip-this-topic', '', {});
282282
await MQTT.events.message('zigbee2mqtt/skip-this-topic', 'skipped');
283-
expect(logger.debug).toHaveBeenCalledTimes(0);
283+
expect(logger.debug).toHaveBeenCalledTimes(1);
284284
});
285285

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

0 commit comments

Comments
 (0)