-
Notifications
You must be signed in to change notification settings - Fork 218
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
Fix #1417 Change socket mode ping/pong from debug to trace #1421
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -187,8 +187,8 @@ | |||||||||
public boolean verifyConnection() { | ||||||||||
if (this.currentSession != null && this.currentSession.isOpen()) { | ||||||||||
String ping = "ping-pong_" + currentSession.getId(); | ||||||||||
if (getLogger().isDebugEnabled()) { | ||||||||||
getLogger().debug("Sending a ping message: {}", ping); | ||||||||||
if (getLogger().isTraceEnabled()) { | ||||||||||
getLogger().trace("Sending a ping message: {}", ping); | ||||||||||
Check warning on line 191 in slack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java Codecov / codecov/patchslack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java#L191
|
||||||||||
} | ||||||||||
ByteBuffer pingBytes = ByteBuffer.wrap(ping.getBytes()); | ||||||||||
try { | ||||||||||
|
@@ -199,8 +199,8 @@ | |||||||||
while (waitMillis <= 3_000L) { | ||||||||||
String pong = latestPong.getAndSet(null); | ||||||||||
if (pong != null && pong.equals(ping)) { | ||||||||||
if (getLogger().isDebugEnabled()) { | ||||||||||
getLogger().debug("Received a pong message: {}", ping); | ||||||||||
if (getLogger().isTraceEnabled()) { | ||||||||||
getLogger().trace("Received a pong message: {}", ping); | ||||||||||
Check warning on line 203 in slack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java Codecov / codecov/patchslack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java#L203
|
||||||||||
} | ||||||||||
return true; | ||||||||||
} | ||||||||||
|
@@ -213,8 +213,8 @@ | |||||||||
this.currentSession.getId(), | ||||||||||
e.getMessage()); | ||||||||||
} | ||||||||||
if (getLogger().isDebugEnabled()) { | ||||||||||
getLogger().debug("Failed to receive a pong message: {}", ping); | ||||||||||
if (getLogger().isTraceEnabled()) { | ||||||||||
getLogger().trace("Failed to receive a pong message: {}", ping); | ||||||||||
Check warning on line 217 in slack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java Codecov / codecov/patchslack-api-client/src/main/java/com/slack/api/socket_mode/impl/SocketModeClientTyrusImpl.java#L217
|
||||||||||
} | ||||||||||
Comment on lines
+216
to
218
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider making this a warning.
Suggested change
|
||||||||||
} | ||||||||||
return false; | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this a warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When taking time until successfully connecting, having these at WARN level every 100 milliseconds can be noisy, so we won't change the log level here.