diff --git a/packages/socket-mode/src/SocketModeClient.ts b/packages/socket-mode/src/SocketModeClient.ts index cb4529e88..ede1d6d24 100644 --- a/packages/socket-mode/src/SocketModeClient.ts +++ b/packages/socket-mode/src/SocketModeClient.ts @@ -742,7 +742,9 @@ export class SocketModeClient extends EventEmitter { // Define Ack const ack = async (response: Record): Promise => { - this.logger.debug(`Calling ack() - type: ${event.type}, envelope_id: ${event.envelope_id}, data: ${response}`); + if (this.logger.getLevel() === LogLevel.DEBUG) { + this.logger.debug(`Calling ack() - type: ${event.type}, envelope_id: ${event.envelope_id}, data: ${JSON.stringify(response)}`); + } await this.send(event.envelope_id, response); };