From 2f24fdb4496d2d3d5fecc6ac0c1840a65ee55f8c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 15 Mar 2005 17:08:55 +0000 Subject: [PATCH] Truncate the text of the long message. We can figure out what it is from the first 80 characters if this every actually discovers an anomaly rather than just dutifully reporting every time someone updates really lengthy crew news. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3409 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/client/Communicator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/client/Communicator.java b/src/java/com/threerings/presents/client/Communicator.java index 1c08500e0..396965ca3 100644 --- a/src/java/com/threerings/presents/client/Communicator.java +++ b/src/java/com/threerings/presents/client/Communicator.java @@ -34,6 +34,7 @@ import com.samskivert.io.NestableIOException; import com.samskivert.util.LoopingThread; import com.samskivert.util.Queue; import com.samskivert.util.RuntimeAdjust; +import com.samskivert.util.StringUtil; import com.threerings.io.FramedInputStream; import com.threerings.io.FramingOutputStream; @@ -315,7 +316,8 @@ public class Communicator try { ByteBuffer buffer = _fout.frameAndReturnBuffer(); if (buffer.limit() > 4096) { - Log.info("Whoa, writin' a big one [msg=" + msg + + String txt = StringUtil.truncate(String.valueOf(msg), 80, "..."); + Log.info("Whoa, writin' a big one [msg=" + txt + ", size=" + buffer.limit() + "]."); } int wrote = _channel.write(buffer);