diff --git a/src/BodyPipe.cc b/src/BodyPipe.cc index dfdf53ae1c9..1e1aa2b22df 100644 --- a/src/BodyPipe.cc +++ b/src/BodyPipe.cc @@ -133,12 +133,12 @@ BodyPipe::BodyPipe(Producer *aProducer): theBodySize(-1), // TODO: teach MemBuf to start with zero minSize // TODO: limit maxSize by theBodySize, when known? theBuf.init(2*1024, MaxCapacity); - debugs(91,7, "created BodyPipe" << status()); + debugs(91,7, "created BodyPipe " << status()); } BodyPipe::~BodyPipe() { - debugs(91,7, "destroying BodyPipe" << status()); + debugs(91,7, "destroying BodyPipe " << status()); assert(!theProducer); assert(!theConsumer); theBuf.clean(); @@ -155,7 +155,7 @@ void BodyPipe::setBodySize(uint64_t aBodySize) assert(!theConsumer); theBodySize = aBodySize; - debugs(91,7, "set body size" << status()); + debugs(91,7, "set body size " << status()); } uint64_t BodyPipe::bodySize() const @@ -194,13 +194,13 @@ void BodyPipe::clearProducer(bool atEof) { if (theProducer.set()) { - debugs(91,7, "clearing BodyPipe producer" << status()); + debugs(91,7, "clearing BodyPipe producer " << status()); theProducer.clear(); if (atEof) { if (!bodySizeKnown()) theBodySize = thePutSize; else if (bodySize() != thePutSize) - debugs(91,3, "aborting on premature eof" << status()); + debugs(91,3, "aborting on premature eof " << status()); } else { // asserta that we can detect the abort if the consumer joins later assert(!bodySizeKnown() || bodySize() != thePutSize); @@ -241,7 +241,7 @@ BodyPipe::setConsumerIfNotLate(const Consumer::Pointer &aConsumer) Must(!abortedConsumption); // did not promise to never consume theConsumer = aConsumer; - debugs(91,7, "set consumer" << status()); + debugs(91,7, "set consumer " << status()); if (theBuf.hasContent()) scheduleBodyDataNotification(); if (!theProducer) @@ -254,7 +254,7 @@ void BodyPipe::clearConsumer() { if (theConsumer.set()) { - debugs(91,7, "clearing consumer" << status()); + debugs(91,7, "clearing consumer " << status()); theConsumer.clear(); // do not abort if we have not consumed so that HTTP or ICAP can retry // benign xaction failures due to persistent connection race conditions @@ -316,7 +316,7 @@ void BodyPipe::enableAutoConsumption() { mustAutoConsume = true; - debugs(91,5, "enabled auto consumption" << status()); + debugs(91,5, "enabled auto consumption " << status()); startAutoConsumptionIfNeeded(); } @@ -336,7 +336,7 @@ BodyPipe::startAutoConsumptionIfNeeded() theConsumer = new BodySink(this); AsyncJob::Start(theConsumer); - debugs(91,7, "starting auto consumption" << status()); + debugs(91,7, "starting auto consumption " << status()); scheduleBodyDataNotification(); } @@ -381,7 +381,7 @@ BodyPipe::postConsume(size_t size) { assert(!isCheckedOut); theGetSize += size; - debugs(91,7, "consumed " << size << " bytes" << status()); + debugs(91,7, "consumed " << size << " bytes " << status()); if (mayNeedMoreData()) { AsyncCall::Pointer call= asyncCall(91, 7, "BodyProducer::noteMoreBodySpaceAvailable", @@ -396,7 +396,7 @@ BodyPipe::postAppend(size_t size) { assert(!isCheckedOut); thePutSize += size; - debugs(91,7, "added " << size << " bytes" << status()); + debugs(91,7, "added " << size << " bytes " << status()); // We should not consume here even if mustAutoConsume because the // caller may not be ready for the data to be consumed during this call. diff --git a/src/HappyConnOpener.cc b/src/HappyConnOpener.cc index a2d3052583c..ec8ac17f6b6 100644 --- a/src/HappyConnOpener.cc +++ b/src/HappyConnOpener.cc @@ -437,17 +437,18 @@ HappyConnOpener::status() const SBufStream os(buf); - os.write(" [", 2); + os << "{ "; if (stopReason) - os << "Stopped:" << stopReason; + os << "stopped: \'" << stopReason << '\''; if (prime) - os << "prime:" << prime; + os << ", prime:" << prime; if (spare) - os << "spare:" << spare; + os << ", spare:" << spare; if (n_tries) - os << " tries:" << n_tries; - os << " dst:" << *destinations; - os << ' ' << id << ']'; + os << ", tries:" << n_tries; + os << ", dst:" << *destinations; + os << ", id: " << id; + os << " }"; buf = os.buf(); return buf.c_str(); diff --git a/src/adaptation/ecap/XactionRep.cc b/src/adaptation/ecap/XactionRep.cc index b7cfe0d8455..2a92a3211ef 100644 --- a/src/adaptation/ecap/XactionRep.cc +++ b/src/adaptation/ecap/XactionRep.cc @@ -357,7 +357,7 @@ Adaptation::Ecap::XactionRep::doneAll() const void Adaptation::Ecap::XactionRep::sinkVb(const char *reason) { - debugs(93,4, "sink for " << reason << "; status:" << status()); + debugs(93,4, "sink for " << reason << "; status: " << status()); // we reset raw().body_pipe when we are done, so use this one for checking const BodyPipePointer &permPipe = theVirginRep.raw().header->body_pipe; @@ -371,7 +371,7 @@ Adaptation::Ecap::XactionRep::sinkVb(const char *reason) void Adaptation::Ecap::XactionRep::preserveVb(const char *reason) { - debugs(93,4, "preserve for " << reason << "; status:" << status()); + debugs(93,4, "preserve for " << reason << "; status: " << status()); // we reset raw().body_pipe when we are done, so use this one for checking const BodyPipePointer &permPipe = theVirginRep.raw().header->body_pipe; @@ -387,7 +387,7 @@ Adaptation::Ecap::XactionRep::preserveVb(const char *reason) void Adaptation::Ecap::XactionRep::forgetVb(const char *reason) { - debugs(93,9, "forget vb " << reason << "; status:" << status()); + debugs(93,9, "forget vb " << reason << "; status: " << status()); BodyPipePointer &p = theVirginRep.raw().body_pipe; if (p != nullptr && p->stillConsuming(this)) @@ -442,7 +442,7 @@ Adaptation::Ecap::XactionRep::useAdapted(const libecap::shared_ptrabMake(); // libecap will produce } } @@ -702,8 +702,6 @@ Adaptation::Ecap::XactionRep::status() const static MemBuf buf; buf.reset(); - buf.append(" [", 2); - if (makingVb) buf.appendf("M%d", static_cast(makingVb)); @@ -732,8 +730,6 @@ Adaptation::Ecap::XactionRep::status() const buf.append(" A?", 3); } - buf.appendf(" %s%u]", id.prefix(), id.value); - buf.terminate(); return buf.content(); diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 5c25b9ae245..d33bae978cb 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -81,7 +81,7 @@ Adaptation::Icap::ModXact::ModXact(Http::Message *virginHeader, icapReply = new HttpReply; icapReply->protoPrefix = "ICAP/"; // TODO: make an IcapReply class? - debugs(93,7, "initialized." << status()); + debugs(93,7, "initialized. " << status()); } // initiator wants us to start @@ -131,7 +131,7 @@ void Adaptation::Icap::ModXact::waitForService() disableRetries(); disableRepeats("ICAP service is not available"); - debugs(93, 7, "will not wait for the service to be available" << + debugs(93, 7, "will not wait for the service to be available " << status()); throw TexcHere("ICAP service is not available"); @@ -196,7 +196,7 @@ void Adaptation::Icap::ModXact::startShoveling() requestBuf.init(); makeRequestHeaders(requestBuf); - debugs(93, 9, "will write" << status() << ":\n" << + debugs(93, 9, "will write " << status() << ":\n" << (requestBuf.terminate(), requestBuf.content())); // write headers @@ -237,7 +237,7 @@ void Adaptation::Icap::ModXact::handleCommWroteHeaders() void Adaptation::Icap::ModXact::writeMore() { - debugs(93, 5, "checking whether to write more" << status()); + debugs(93, 5, "checking whether to write more " << status()); if (writer != nullptr) // already writing something return; @@ -274,7 +274,7 @@ void Adaptation::Icap::ModXact::writeMore() void Adaptation::Icap::ModXact::writePreviewBody() { debugs(93, 8, "will write Preview body from " << - virgin.body_pipe << status()); + virgin.body_pipe << ' ' << status()); Must(state.writing == State::writingPreview); Must(virgin.body_pipe != nullptr); @@ -298,7 +298,7 @@ void Adaptation::Icap::ModXact::decideWritingAfterPreview(const char *kind) else stopWriting(true); // ICAP server reply implies no post-preview writing - debugs(93, 6, "decided on writing after " << kind << " preview" << + debugs(93, 6, "decided on writing after " << kind << " preview " << status()); } @@ -490,12 +490,12 @@ void Adaptation::Icap::ModXact::stopWriting(bool nicely) if (writer != nullptr) { if (nicely) { - debugs(93, 7, "will wait for the last write" << status()); + debugs(93, 7, "will wait for the last write " << status()); state.writing = State::writingAlmostDone; // may already be set checkConsuming(); return; } - debugs(93, 3, "will NOT wait for the last write" << status()); + debugs(93, 3, "will NOT wait for the last write " << status()); // Comm does not have an interface to clear the writer callback nicely, // but without clearing the writer we cannot recycle the connection. @@ -506,7 +506,7 @@ void Adaptation::Icap::ModXact::stopWriting(bool nicely) ignoreLastWrite = true; } - debugs(93, 7, "will no longer write" << status()); + debugs(93, 7, "will no longer write " << status()); if (virginBodyWriting.active()) { virginBodyWriting.disable(); virginConsume(); @@ -520,7 +520,7 @@ void Adaptation::Icap::ModXact::stopBackup() if (!virginBodySending.active()) return; - debugs(93, 7, "will no longer backup" << status()); + debugs(93, 7, "will no longer backup " << status()); virginBodySending.disable(); virginConsume(); } @@ -581,7 +581,7 @@ void Adaptation::Icap::ModXact::echoMore() const size_t sizeMax = virginContentSize(virginBodySending); debugs(93,5, "will echo up to " << sizeMax << " bytes from " << virgin.body_pipe->status()); - debugs(93,5, "will echo up to " << sizeMax << " bytes to " << + debugs(93,5, "will echo up to " << sizeMax << " bytes to " << adapted.body_pipe->status()); if (sizeMax > 0) { @@ -595,12 +595,12 @@ void Adaptation::Icap::ModXact::echoMore() } if (virginBodyEndReached(virginBodySending)) { - debugs(93, 5, "echoed all" << status()); + debugs(93, 5, "echoed all " << status()); stopSending(true); } else { debugs(93, 5, "has " << virgin.body_pipe->buf().contentSize() << " bytes " << - "and expects more to echo" << status()); + "and expects more to echo " << status()); // TODO: timeout if virgin or adapted pipes are broken } } @@ -619,7 +619,7 @@ void Adaptation::Icap::ModXact::stopSending(bool nicely) debugs(93, 7, "Proceed with stop sending "); if (state.sending != State::sendingUndecided) { - debugs(93, 7, "will no longer send" << status()); + debugs(93, 7, "will no longer send " << status()); if (adapted.body_pipe != nullptr) { virginBodySending.disable(); // we may leave debts if we were echoing and the virgin @@ -628,7 +628,7 @@ void Adaptation::Icap::ModXact::stopSending(bool nicely) stopProducingFor(adapted.body_pipe, nicely && !leftDebts); } } else { - debugs(93, 7, "will not start sending" << status()); + debugs(93, 7, "will not start sending " << status()); Must(!adapted.body_pipe); } @@ -643,13 +643,13 @@ void Adaptation::Icap::ModXact::checkConsuming() if (!virgin.body_pipe || !state.doneConsumingVirgin()) return; - debugs(93, 7, "will stop consuming" << status()); + debugs(93, 7, "will stop consuming " << status()); stopConsumingFrom(virgin.body_pipe); } void Adaptation::Icap::ModXact::parseMore() { - debugs(93, 5, "have " << readBuf.length() << " bytes to parse" << status()); + debugs(93, 5, "have " << readBuf.length() << " bytes to parse " << status()); debugs(93, 5, "\n" << readBuf); if (state.parsingHeaders()) @@ -708,7 +708,7 @@ void Adaptation::Icap::ModXact::bypassFailure() reuseConnection = false; // be conservative cancelRead(); // may not work; and we cannot stop connecting either if (!doneWithIo()) - debugs(93, 7, "Warning: bypass failed to stop I/O" << status()); + debugs(93, 7, "Warning: bypass failed to stop I/O " << status()); } service().noteFailure(); // we are bypassing, but this is still a failure @@ -1218,7 +1218,7 @@ void Adaptation::Icap::ModXact::stopParsing(const bool checkUnparsedData) if (checkUnparsedData) Must(readBuf.isEmpty()); - debugs(93, 7, "will no longer parse" << status()); + debugs(93, 7, "will no longer parse " << status()); delete bodyParser; bodyParser = nullptr; @@ -1292,7 +1292,7 @@ Adaptation::Icap::ModXact::~ModXact() // internal cleanup void Adaptation::Icap::ModXact::swanSong() { - debugs(93, 5, "swan sings" << status()); + debugs(93, 5, "swan sings " << status()); stopWriting(false); stopSending(false); diff --git a/src/adaptation/icap/OptXact.cc b/src/adaptation/icap/OptXact.cc index 0cf5c7bab49..8d97f6f828e 100644 --- a/src/adaptation/icap/OptXact.cc +++ b/src/adaptation/icap/OptXact.cc @@ -101,7 +101,7 @@ void Adaptation::Icap::OptXact::handleCommRead(size_t) bool Adaptation::Icap::OptXact::parseResponse() { - debugs(93, 5, "have " << readBuf.length() << " bytes to parse" << status()); + debugs(93, 5, "have " << readBuf.length() << " bytes to parse " << status()); debugs(93, DBG_DATA, "\n" << readBuf); HttpReply::Pointer r(new HttpReply); diff --git a/src/adaptation/icap/ServiceRep.cc b/src/adaptation/icap/ServiceRep.cc index ddefdfefaaf..2f3a73801eb 100644 --- a/src/adaptation/icap/ServiceRep.cc +++ b/src/adaptation/icap/ServiceRep.cc @@ -567,7 +567,7 @@ void Adaptation::Icap::ServiceRep::callException(const std::exception &e) { clearAdaptation(theOptionsFetcher); debugs(93,2, "ICAP probably failed to fetch options (" << e.what() << - ")" << status()); + ") " << status()); handleNewOptions(nullptr); } @@ -674,12 +674,12 @@ Adaptation::Icap::ServiceRep::makeXactLauncher(Http::Message *virgin, } // returns a temporary string depicting service status, for debugging -const char *Adaptation::Icap::ServiceRep::status() const +const char * +Adaptation::Icap::ServiceRep::status() const { static MemBuf buf; buf.reset(); - buf.append("[", 1); if (up()) buf.append("up", 2); @@ -708,7 +708,6 @@ const char *Adaptation::Icap::ServiceRep::status() const if (const int failures = theSessionFailures.remembered()) buf.appendf(",fail%d", failures); - buf.append("]", 1); buf.terminate(); return buf.content(); diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index c25d36c2a2e..200c0315b6a 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -232,7 +232,7 @@ void Adaptation::Icap::Xaction::closeConnection() if (reuseConnection && !doneWithIo()) { //status() adds leading spaces. - debugs(93,5, "not reusing pconn due to pending I/O" << status()); + debugs(93,5, "not reusing pconn due to pending I/O " << status()); reuseConnection = false; } @@ -349,8 +349,8 @@ void Adaptation::Icap::Xaction::noteCommWrote(const CommIoCbParams &io) void Adaptation::Icap::Xaction::noteCommTimedout(const CommTimeoutCbParams &) { debugs(93, 2, typeName << " failed: timeout with " << - theService->cfg().methodStr() << " " << - theService->cfg().uri << status()); + theService->cfg().methodStr() << ' ' << + theService->cfg().uri << ' ' << status()); reuseConnection = false; assert(haveConnection()); closeConnection(); @@ -381,7 +381,7 @@ void Adaptation::Icap::Xaction::callException(const std::exception &e) void Adaptation::Icap::Xaction::callEnd() { if (doneWithIo()) { - debugs(93, 5, typeName << " done with I/O" << status()); + debugs(93, 5, typeName << " done with I/O " << status()); closeConnection(); } Adaptation::Initiate::callEnd(); // may destroy us @@ -637,11 +637,9 @@ const char *Adaptation::Icap::Xaction::status() const { static MemBuf buf; buf.reset(); - buf.append(" [", 2); fillPendingStatus(buf); buf.append("/", 1); fillDoneStatus(buf); - buf.appendf(" %s%u]", id.prefix(), id.value); buf.terminate(); return buf.content(); diff --git a/src/base/AsyncJob.cc b/src/base/AsyncJob.cc index 5c63bc6b26c..44954138e8f 100644 --- a/src/base/AsyncJob.cc +++ b/src/base/AsyncJob.cc @@ -16,7 +16,6 @@ #include "base/TextException.h" #include "cbdata.h" #include "mem/PoolingAllocator.h" -#include "MemBuf.h" #include "mgr/Registration.h" #include "Store.h" @@ -136,7 +135,7 @@ void AsyncJob::callStart(AsyncCall &call) inCall = &call; // XXX: ugly, but safe if callStart/callEnd,Ex are paired debugs(inCall->debugSection, inCall->debugLevel, - typeName << " status in:" << status()); + typeName << " status in: " << status()); } void @@ -152,7 +151,7 @@ AsyncJob::callException(const std::exception &ex) void AsyncJob::callEnd() { if (done()) { - debugs(93, 5, *inCall << " ends job" << status()); + debugs(93, 5, *inCall << " ends job " << status()); AsyncCall::Pointer inCallSaved = inCall; void *thisSaved = this; @@ -174,21 +173,20 @@ void AsyncJob::callEnd() } debugs(inCall->debugSection, inCall->debugLevel, - typeName << " status out:" << status()); + typeName << " status out: " << status()); inCall = nullptr; } // returns a temporary string depicting transaction status, for debugging -const char *AsyncJob::status() const +const char * +AsyncJob::status() const { static MemBuf buf; buf.reset(); - buf.append(" [", 2); if (stopReason != nullptr) { - buf.appendf("Stopped, reason:%s", stopReason); + buf.appendf("Stopped, reason: %s", stopReason); } - buf.appendf(" %s%u]", id.prefix(), id.value); buf.terminate(); return buf.content(); @@ -199,15 +197,16 @@ AsyncJob::ReportAllJobs(StoreEntry *e) { PackableStream os(*e); // this loop uses YAML syntax, but AsyncJob::status() still needs to be adjusted to use YAML - const char *indent = " "; + const SBuf indent(" "); for (const auto job: AllJobs()) { - os << indent << job->id << ":\n"; - os << indent << indent << "type: '" << job->typeName << "'\n"; - os << indent << indent << "status:" << job->status() << '\n'; - if (!job->started_) - os << indent << indent << "started: false\n"; + os << job->id << ":\n"; + os << indent << "type: '" << job->typeName << "'\n"; + const char *status = job->status(); + if (status && strlen(status)) + os << indent << "status: '" << job->status() << "'\n"; + os << indent << "started: " << (job->started_ ? "Yes": "No" ) << '\n'; if (job->stopReason) - os << indent << indent << "stopped: '" << job->stopReason << "'\n"; + os << indent << "stopped: \'" << job->stopReason << "'\n"; } } diff --git a/src/client_side.cc b/src/client_side.cc index eac7d93528f..7d0114940c1 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2041,11 +2041,11 @@ ConnStateData::handleChunkedRequestBody() // if parser needs more space and we can consume nothing, we will stall Must(!bodyParser->needsMoreSpace() || bodyPipe->buf().hasContent()); } catch (...) { // TODO: be more specific - debugs(33, 3, "malformed chunks" << bodyPipe->status()); + debugs(33, 3, "malformed chunks " << bodyPipe->status()); return ERR_INVALID_REQ; } - debugs(33, 7, "need more chunked data" << *bodyPipe->status()); + debugs(33, 7, "need more chunked data " << *bodyPipe->status()); return ERR_NONE; } @@ -3618,7 +3618,7 @@ void ConnStateData::startDechunkingRequest() { Must(bodyPipe != nullptr); - debugs(33, 5, "start dechunking" << bodyPipe->status()); + debugs(33, 5, "start dechunking " << bodyPipe->status()); assert(!bodyParser); bodyParser = new Http1::TeChunkedParser; } diff --git a/src/clients/HttpTunneler.cc b/src/clients/HttpTunneler.cc index d52dd457e82..0a1a5266871 100644 --- a/src/clients/HttpTunneler.cc +++ b/src/clients/HttpTunneler.cc @@ -122,7 +122,7 @@ Http::Tunneler::handleTimeout(const CommTimeoutCbParams &) void Http::Tunneler::startReadingResponse() { - debugs(83, 5, connection << status()); + debugs(83, 5, connection << ' ' << status()); readBuf.reserveCapacity(SQUID_TCP_SO_RCVBUF); readMore(); @@ -410,7 +410,7 @@ Http::Tunneler::disconnect() void Http::Tunneler::callBack() { - debugs(83, 5, callback.answer().conn << status()); + debugs(83, 5, callback.answer().conn << ' ' << status()); assert(!connection); // returned inside callback.answer() or gone ScheduleCallHere(callback.release()); } @@ -439,7 +439,7 @@ Http::Tunneler::status() const // TODO: redesign AsyncJob::status() API to avoid // id and stop reason reporting duplication. - buf.append(" [state:", 8); + buf.append("state:", 8); if (requestWritten) buf.append("w", 1); // request sent if (tunnelEstablished) buf.append("t", 1); // tunnel established if (!callback) buf.append("x", 1); // caller informed @@ -449,7 +449,6 @@ Http::Tunneler::status() const } if (connection != nullptr) buf.appendf(" FD %d", connection->fd); - buf.appendf(" %s%u]", id.prefix(), id.value); buf.terminate(); return buf.content(); diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index aa082df4b46..380c6b0da4f 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -124,7 +124,7 @@ const char * Comm::TcpAcceptor::status() const { if (conn == nullptr) - return "[nil connection]"; + return "nil connection"; static char ipbuf[MAX_IPSTRLEN] = {'\0'}; if (ipbuf[0] == '\0') @@ -132,7 +132,7 @@ Comm::TcpAcceptor::status() const static MemBuf buf; buf.reset(); - buf.appendf(" FD %d, %s",conn->fd, ipbuf); + buf.appendf("FD %d, %s",conn->fd, ipbuf); const char *jobStatus = AsyncJob::status(); buf.append(jobStatus, strlen(jobStatus)); diff --git a/src/ipc/Inquirer.cc b/src/ipc/Inquirer.cc index e4438f0d1ae..0cccf803454 100644 --- a/src/ipc/Inquirer.cc +++ b/src/ipc/Inquirer.cc @@ -104,7 +104,7 @@ Ipc::Inquirer::inquire() ++LastRequestId; request->requestId = LastRequestId; const int kidId = pos->kidId; - debugs(54, 4, "inquire kid: " << kidId << status()); + debugs(54, 4, "inquire kid: " << kidId << ' ' << status()); TheWaitingInquirers[request->requestId] = this; TypedMsgHdr message; request->pack(message); @@ -221,7 +221,7 @@ Ipc::Inquirer::status() const { static MemBuf buf; buf.reset(); - buf.appendf(" [requestId %u]", request->requestId.index()); + buf.appendf("requestId %u", request->requestId.index()); buf.terminate(); return buf.content(); } diff --git a/src/security/PeerConnector.cc b/src/security/PeerConnector.cc index 96c2f0ed340..5da74147625 100644 --- a/src/security/PeerConnector.cc +++ b/src/security/PeerConnector.cc @@ -582,14 +582,12 @@ Security::PeerConnector::status() const // TODO: redesign AsyncJob::status() API to avoid this // id and stop reason reporting duplication. - buf.append(" [", 2); if (stopReason != nullptr) { buf.append("Stopped, reason:", 16); buf.appendf("%s",stopReason); } if (Comm::IsConnOpen(serverConn)) buf.appendf(" FD %d", serverConn->fd); - buf.appendf(" %s%u]", id.prefix(), id.value); buf.terminate(); return buf.content();