From 95855066447a5327bbb1c5f02bf3ec3bd2eb7bb8 Mon Sep 17 00:00:00 2001 From: zimoch Date: Tue, 15 May 2012 09:14:34 +0000 Subject: [PATCH] debug messages improved --- src/StreamProtocol.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/StreamProtocol.cc b/src/StreamProtocol.cc index 0cb40c7..d58d9b4 100644 --- a/src/StreamProtocol.cc +++ b/src/StreamProtocol.cc @@ -1374,7 +1374,7 @@ compileString(StreamBuffer& buffer, const char*& source, if (c) continue; // source may contain a function name error(line, filename(), - "Unexpected word: %s\n", source); + "Unexpected word: \"%s\"\n", source); return false; } debug("StreamProtocolParser::Protocol::compileString buffer=%s\n", buffer.expand()()); @@ -1493,8 +1493,10 @@ compileFormat(StreamBuffer& buffer, const char*& formatstr, buffer.append(&streamFormat, sizeof(streamFormat)); buffer.append(infoString); - debug("StreamProtocolParser::Protocol::compileFormat: format.type=%s, infolen=%d\n", - StreamFormatTypeStr[streamFormat.type], streamFormat.infolen); + debug("StreamProtocolParser::Protocol::compileFormat: format.type=%s, " + "infolen=%d infostring=\"%s\"\n", + StreamFormatTypeStr[streamFormat.type], + streamFormat.infolen, infoString.expand()()); formatstr = source; // move pointer after parsed format return true; }