Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socketmode remove duplicate debug logging #1165

Merged

Conversation

kittydoor
Copy link

smc.runRequestHandler and smc.runMessageReceiver are both run as goroutines.

Respectively, when debug is enabled, they log the event:

  • smc.Debugf("Received WebSocket message: %s", message)
  • smc.Debugln("Incoming WebSocket message:", reencoded) (in receiveMessagesInto)

One of these should be removed. This PR removes the latter as it re-marshalls the json, and pretty prints (and was the offender that made me investigate this in the first place).

I'm open to other ideas too, as long as it means the end result is no pretty-printed log line, and no duplicate logging of the same data in full.

Copy link
Member

@kanata2 kanata2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@kanata2 kanata2 merged commit b4b5a64 into slack-go:master Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants