Skip to content

Commit

Permalink
Tweak debug logs in SocketModeClient (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch authored May 10, 2023
1 parent 8739649 commit 816aad0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/socket-mode/src/SocketModeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ export class SocketModeClient extends EventEmitter {

// Define Ack
const ack = async (response: Record<string, unknown>): Promise<void> => {
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);
};

Expand Down

0 comments on commit 816aad0

Please sign in to comment.