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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user