Improve WSClient and party logging
- Remove duplicate logging from both WSClient and plugins listening for incoming messages - Log json instead of deserialized message on receiving message (because toString might not be properly implemented) Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -234,8 +234,6 @@ public class PartyPlugin extends Plugin implements KeyListener
|
||||
@Subscribe
|
||||
public void onTilePing(TilePing event)
|
||||
{
|
||||
log.debug("Got tile ping {}", event);
|
||||
|
||||
if (config.pings())
|
||||
{
|
||||
pendingTilePings.add(new PartyTilePingData(event.getPoint()));
|
||||
|
||||
@@ -114,7 +114,6 @@ public class PartyService
|
||||
@Subscribe
|
||||
public void onUserJoin(final UserJoin message)
|
||||
{
|
||||
log.debug("User {} joined", message);
|
||||
final PartyMember partyMember = new PartyMember(message.getMemberId(), message.getName());
|
||||
members.add(partyMember);
|
||||
|
||||
@@ -130,7 +129,6 @@ public class PartyService
|
||||
@Subscribe
|
||||
public void onUserPart(final UserPart message)
|
||||
{
|
||||
log.debug("User {} left", message);
|
||||
members.removeIf(member -> member.getMemberId().equals(message.getMemberId()));
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
return;
|
||||
}
|
||||
|
||||
log.debug("Got message: {}", message);
|
||||
log.debug("Got: {}", text);
|
||||
eventBus.post(message);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
@Override
|
||||
public void onFailure(WebSocket webSocket, Throwable t, Response response)
|
||||
{
|
||||
log.warn("Error in websocket", t);
|
||||
log.warn("Error in websocket {}:{}", response, t);
|
||||
this.webSocket = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user