From 3e7f27aec445bb6a00cb861b5631a169dd9bf22a Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Thu, 15 Feb 2024 16:22:06 +0000 Subject: [PATCH] HPCC-31294 Refactor the way job ids are passed to the logging Signed-off-by: Gavin Halliday --- common/dllserver/dllserver.cpp | 2 +- common/environment/environment.cpp | 12 +- common/remote/rmtspawn.cpp | 48 ++--- common/thorhelper/roxiehelper.ipp | 6 +- common/thorhelper/thorcommon.hpp | 9 +- common/thorhelper/thorsoapcall.cpp | 2 +- common/thorhelper/thortparse.cpp | 14 +- common/workunit/workunit.cpp | 4 +- dali/base/dacoven.cpp | 2 +- dali/base/dadfs.cpp | 4 +- dali/base/danqs.cpp | 2 +- dali/base/dasds.cpp | 48 ++--- dali/base/dasess.cpp | 2 +- dali/dfu/dfu2.cpp | 2 +- dali/dfu/dfurun.cpp | 6 +- dali/dfu/dfuserver.cpp | 2 +- dali/ft/daft.cpp | 4 +- dali/ft/daftformat.cpp | 93 ++++---- dali/ft/daftformat.ipp | 2 +- dali/ft/daftprogress.cpp | 4 +- dali/ft/filecopy.cpp | 125 ++++++----- dali/ft/filecopy.ipp | 1 - dali/ft/ftbase.cpp | 12 +- dali/ft/ftslavelib.cpp | 2 +- dali/ft/fttransform.cpp | 26 +-- dali/sasha/sacoalescer.cpp | 2 +- dali/sasha/saserver.cpp | 10 +- dali/sasha/saverify.cpp | 6 +- dali/server/daserver.cpp | 6 +- ecl/eclagent/eclagent.cpp | 54 ++--- ecl/eclcc/eclcc.cpp | 4 +- ecl/hql/hqlexpr.cpp | 2 +- ecl/hqlcpp/hqlhtcpp.cpp | 10 +- ecl/hthor/hthorkey.cpp | 4 +- ecl/wutest/wujobqtest.cpp | 4 +- esp/bindings/SOAP/Platform/soapservice.cpp | 6 +- esp/esdllib/esdl_def.cpp | 2 +- esp/platform/espcfg.cpp | 2 +- esp/platform/espcontext.cpp | 4 +- esp/platform/espp.hpp | 2 +- esp/services/ws_fileio/ws_fileioservice.cpp | 8 +- esp/services/ws_fs/ws_fsService.cpp | 2 +- .../ws_workunits/ws_workunitsHelpers.cpp | 2 +- esp/smc/SMCLib/LogicFileWrapper.hpp | 2 +- esp/smc/SMCLib/TpCommon.cpp | 2 +- fs/dafsserver/dafsserver.cpp | 56 ++--- roxie/ccd/ccd.hpp | 8 +- roxie/ccd/ccdcontext.cpp | 4 +- roxie/ccd/ccdserver.cpp | 16 +- rtl/eclrtl/eclrtl.cpp | 2 +- rtl/eclrtl/rtlbcdtest.cpp | 4 +- system/jlib/jcontainerized.cpp | 6 +- system/jlib/jdebug.cpp | 8 +- system/jlib/jfile.cpp | 2 +- system/jlib/jlog.cpp | 199 ++++-------------- system/jlib/jlog.hpp | 114 +++------- system/jlib/jlog.ipp | 11 +- system/jlib/jmisc.cpp | 8 +- system/mp/mpcomm.cpp | 104 ++++----- .../hashdistrib/thhashdistribslave.cpp | 4 +- .../activities/indexread/thindexreadslave.cpp | 4 +- .../keyedjoin/thkeyedjoinslave-legacy.cpp | 2 +- .../activities/keyedjoin/thkeyedjoinslave.cpp | 8 +- thorlcr/activities/msort/thsortu.cpp | 16 +- .../activities/soapcall/thsoapcallslave.cpp | 8 +- thorlcr/activities/thdiskbase.cpp | 2 +- thorlcr/graph/thgraph.cpp | 26 +-- thorlcr/graph/thgraphmaster.cpp | 30 +-- thorlcr/graph/thgraphslave.cpp | 4 +- thorlcr/master/mawatchdog.cpp | 16 +- thorlcr/master/thactivitymaster.cpp | 2 +- thorlcr/master/thdemonserver.cpp | 14 +- thorlcr/master/thgraphmanager.cpp | 26 +-- thorlcr/master/thmastermain.cpp | 36 ++-- thorlcr/mfilemanager/thmfilemanager.cpp | 2 +- thorlcr/msort/tsortl.cpp | 24 +-- thorlcr/msort/tsortmp.cpp | 6 +- thorlcr/msort/tsorts.cpp | 6 +- thorlcr/msort/tsorts1.cpp | 30 +-- thorlcr/slave/backup.cpp | 4 +- thorlcr/slave/slavmain.cpp | 14 +- thorlcr/slave/slwatchdog.cpp | 8 +- thorlcr/slave/thslavemain.cpp | 38 ++-- thorlcr/thorutil/thbuf.cpp | 4 +- thorlcr/thorutil/thormisc.cpp | 26 +-- thorlcr/thorutil/thormisc.hpp | 6 +- tools/swapnode/swapnodelib.cpp | 4 +- 87 files changed, 646 insertions(+), 834 deletions(-) diff --git a/common/dllserver/dllserver.cpp b/common/dllserver/dllserver.cpp index 028ee42c324..46cef2609f4 100644 --- a/common/dllserver/dllserver.cpp +++ b/common/dllserver/dllserver.cpp @@ -632,7 +632,7 @@ ILoadedDllEntry * DllServerBase::doLoadDll(const char * name, DllLocationType ty location->getDllFilename(rfile); StringBuffer x; rfile.getPath(x); - LOG(MCdebugInfo, unknownJob, "Loading dll (%s) from location %s", name, x.str()); + LOG(MCdebugInfo, "Loading dll (%s) from location %s", name, x.str()); return createDllEntry(x.str(), false, NULL, resourcesOnly); } diff --git a/common/environment/environment.cpp b/common/environment/environment.cpp index d3d33cf2a2e..53ef6a8e44d 100644 --- a/common/environment/environment.cpp +++ b/common/environment/environment.cpp @@ -1877,7 +1877,7 @@ bool CLocalEnvironment::getRunInfo(IStringVal & path, IStringVal & dir, const ch Owned machine = getMachineByAddress(machineaddr); if (!machine) { - LOG(MCdebugInfo, unknownJob, "Unable to find machine for %s", machineaddr); + LOG(MCdebugInfo, "Unable to find machine for %s", machineaddr); return false; } @@ -1885,7 +1885,7 @@ bool CLocalEnvironment::getRunInfo(IStringVal & path, IStringVal & dir, const ch Owned domain = machine->getDomain(); if (!domain) { - LOG(MCdebugInfo, unknownJob, "Unable to find domain for %s", machineaddr); + LOG(MCdebugInfo, "Unable to find domain for %s", machineaddr); return false; } @@ -1896,7 +1896,7 @@ bool CLocalEnvironment::getRunInfo(IStringVal & path, IStringVal & dir, const ch Owned instance = getInstance(tag, version, targetdomain); if (!instance) { - LOG(MCdebugInfo, unknownJob, "Unable to find process %s for domain %s", tag, targetdomain.get()); + LOG(MCdebugInfo, "Unable to find process %s for domain %s", tag, targetdomain.get()); return false; } return instance->getRunInfo(path,dir,defprogname); @@ -1944,7 +1944,7 @@ IConstDropZoneInfo * CLocalEnvironment::getDropZoneByAddressPath(const char * ne unsigned dropzonePathLen = _MAX_PATH + 1; #ifdef _DEBUG - LOG(MCdebugInfo, unknownJob, "Netaddress: '%s', targetFilePath: '%s'", netaddress, targetFilePath); + LOG(MCdebugInfo, "Netaddress: '%s', targetFilePath: '%s'", netaddress, targetFilePath); #endif // Check the directory path first @@ -1973,7 +1973,7 @@ IConstDropZoneInfo * CLocalEnvironment::getDropZoneByAddressPath(const char * ne #ifdef _DEBUG StringBuffer serverIpString; serverIP.getHostText(serverIpString); - LOG(MCdebugInfo, unknownJob, "Listed server: '%s', IP: '%s'", dropzoneServer.str(), serverIpString.str()); + LOG(MCdebugInfo, "Listed server: '%s', IP: '%s'", dropzoneServer.str(), serverIpString.str()); #endif if (strisame(netaddress, dropzoneServer) || targetIp.ipequals(serverIP)) { @@ -2551,7 +2551,7 @@ unsigned getAccessibleServiceURLList(const char *serviceType, std::vector espBindingIter = espProcessIter->query().getElements("EspBinding"); ForEach(*espBindingIter) { - xpath.setf("Software/EspService[@name=\"%s\"]/Properties/@type", espBindingIter->query().queryProp("@service")); + xpath.setf("Software/EspService[@name=\"%s\"]/Properties/@type", espBindingIter->query().queryProp("@service")); if (strisame(env->queryProp(xpath), serviceType)) { diff --git a/common/remote/rmtspawn.cpp b/common/remote/rmtspawn.cpp index 64f213b1fcb..fb029ab023c 100644 --- a/common/remote/rmtspawn.cpp +++ b/common/remote/rmtspawn.cpp @@ -137,7 +137,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint if (abort && abort->abortRequested()) { - LOG(MCdetailDebugInfo, unknownJob, "Action aborted before connecting to slave (%3d)", replyTag); + LOG(MCdetailDebugInfo, "Action aborted before connecting to slave (%3d)", replyTag); return NULL; } @@ -169,7 +169,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint unsigned attempts = 20; SocketEndpoint connectEP(childEP); connectEP.port = port; - LOG(MCdetailDebugInfo, unknownJob, "Start connect to correct slave (%3d)", replyTag); + LOG(MCdetailDebugInfo, "Start connect to correct slave (%3d)", replyTag); IException * error = NULL; ISocket * result = NULL; while (!result && attempts) @@ -178,7 +178,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint { StringBuffer tmp; connectEP.getEndpointHostText(tmp); - LOG(MCdetailDebugInfo, unknownJob, "Try to connect to slave %s",tmp.str()); + LOG(MCdetailDebugInfo, "Try to connect to slave %s",tmp.str()); Owned socket = ISocket::connect_wait(connectEP,MASTER_CONNECT_SLAVE_TIMEOUT); if (socket) { @@ -202,7 +202,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint if (connected) { assertex(slaveTag == replyTag); - LOG(MCdetailDebugInfo, unknownJob, "Connected to correct slave (%3d)", replyTag); + LOG(MCdetailDebugInfo, "Connected to correct slave (%3d)", replyTag); result = socket.getClear(); break; } @@ -218,9 +218,9 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint break; } if (slaveKind != kind) - LOG(MCdetailDebugInfo, unknownJob, "Connected to wrong kind of slave (%d,%d/%d) - try again later",connected,replyTag,slaveTag); + LOG(MCdetailDebugInfo, "Connected to wrong kind of slave (%d,%d/%d) - try again later",connected,replyTag,slaveTag); else - LOG(MCdetailDebugInfo, unknownJob, "Failed to connect to correct slave (%d,%d/%d) - try again later",connected,replyTag,slaveTag); + LOG(MCdetailDebugInfo, "Failed to connect to correct slave (%d,%d/%d) - try again later",connected,replyTag,slaveTag); //Wrong slave listening, need to leave time for the other, don't count as an attempt MilliSleep(fastRand() % 5000 + 5000); @@ -230,7 +230,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint StringBuffer s; s.appendf("Retry after exception talking to slave (%d): ",replyTag); e->errorMessage(s); - LOG(MCdetailDebugInfo, unknownJob, "%s", s.str()); + LOG(MCdetailDebugInfo, "%s", s.str()); e->Release(); //Probably another element just connected, and the listening socket has just been killed. //So try again. Wait just long enough to give another thread a chance. @@ -241,7 +241,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint catch (IException * e) { StringBuffer s; - LOG(MCdetailDebugInfo, unknownJob, e, s.appendf("Failed to connect to slave (%d) (try again): ", replyTag).str()); + LOG(MCdetailDebugInfo, e, s.appendf("Failed to connect to slave (%d) (try again): ", replyTag).str()); e->Release(); // No socket listening or contention - try again fairly soon MilliSleep(fastRand()%400+100); @@ -288,7 +288,7 @@ bool CRemoteParentInfo::processCommandLine(int argc, const char * * argv, String void CRemoteParentInfo::log() { StringBuffer temp; - LOG(MCdebugProgress, unknownJob, "Starting remote slave. Master=%s reply=%d port=%d", parent.getEndpointHostText(temp).str(), replyTag, port); + LOG(MCdebugProgress, "Starting remote slave. Master=%s reply=%d port=%d", parent.getEndpointHostText(temp).str(), replyTag, port); } bool CRemoteParentInfo::sendReply(unsigned version) @@ -300,7 +300,7 @@ bool CRemoteParentInfo::sendReply(unsigned version) { try { - LOG(MCdetailDebugInfo, unknownJob, "Ready to listen. reply=%d port=%d", replyTag, port); + LOG(MCdetailDebugInfo, "Ready to listen. reply=%d port=%d", replyTag, port); Owned listen = ISocket::create(port, 1); if (listen) { @@ -313,11 +313,11 @@ bool CRemoteParentInfo::sendReply(unsigned version) { try { - LOG(MCdetailDebugInfo, unknownJob, "Ready to accept connection. reply=%d", replyTag); + LOG(MCdetailDebugInfo, "Ready to accept connection. reply=%d", replyTag); if (!listen->wait_read(SLAVE_LISTEN_FOR_MASTER_TIMEOUT)) { - LOG(MCdetailDebugInfo, unknownJob, "Gave up waiting for a connection. reply=%d", replyTag); + LOG(MCdetailDebugInfo, "Gave up waiting for a connection. reply=%d", replyTag); return false; } @@ -333,7 +333,7 @@ bool CRemoteParentInfo::sendReply(unsigned version) buffer.read(connectTag); masterIP.getHostText(masterIPtext.clear()); - LOG(MCdetailDebugInfo, unknownJob, "Process incoming connection. reply=%d got(%d,%s)", replyTag,connectTag,masterIPtext.str()); + LOG(MCdetailDebugInfo, "Process incoming connection. reply=%d got(%d,%s)", replyTag,connectTag,masterIPtext.str()); same = (kind == connectKind) && masterIP.ipequals(parent) && (connectTag == replyTag); } @@ -344,7 +344,7 @@ bool CRemoteParentInfo::sendReply(unsigned version) //can remove when all .exes have new code. if (connectKind != kind) { - LOG(MCdetailDebugInfo, unknownJob, "Connection for wrong slave kind (%u vs %u)- ignore", connectKind, kind); + LOG(MCdetailDebugInfo, "Connection for wrong slave kind (%u vs %u)- ignore", connectKind, kind); } } @@ -358,12 +358,12 @@ bool CRemoteParentInfo::sendReply(unsigned version) if (same) { socket.setown(connect.getClear()); - LOG(MCdetailDebugInfo, unknownJob, "Connection matched - continue...."); + LOG(MCdetailDebugInfo, "Connection matched - continue...."); return true; } if ((connectKind == kind) && (version != connectVersion)) { - LOG(MCdebugInfo, unknownJob, "Version mismatch - terminating slave process expected %d got %d", version, connectVersion); + LOG(MCdebugInfo, "Version mismatch - terminating slave process expected %d got %d", version, connectVersion); return false; } } @@ -419,7 +419,7 @@ void CRemoteSlave::run(int argc, const char * * argv) logFile.append(".log"); attachStandardFileLogMsgMonitor(logFile.str(), 0, MSGFIELD_STANDARD, MSGAUD_all, MSGCLS_all, TopDetail, LOGFORMAT_table, true, true); queryLogMsgManager()->removeMonitor(queryStderrLogMsgHandler()); // no point logging output to screen if run remote! - LOG(MCdebugProgress, unknownJob, "Starting %s %s %s %s %s %s %s",slaveName.get(),(argc>1)?argv[1]:"",(argc>2)?argv[2]:"",(argc>3)?argv[3]:"",(argc>4)?argv[4]:"",(argc>5)?argv[5]:"",(argc>6)?argv[6]:""); + LOG(MCdebugProgress, "Starting %s %s %s %s %s %s %s",slaveName.get(),(argc>1)?argv[1]:"",(argc>2)?argv[2]:"",(argc>3)?argv[3]:"",(argc>4)?argv[4]:"",(argc>5)?argv[5]:"",(argc>6)?argv[6]:""); #else setupContainerizedLogMsgHandler(); #endif @@ -485,7 +485,7 @@ void CRemoteSlave::run(int argc, const char * * argv) } catch (RELEASE_CATCH_ALL) { - LOG(MCwarning, unknownJob, "Server seems to have crashed - close done gracefully"); + LOG(MCwarning, "Server seems to have crashed - close done gracefully"); error.setown(MakeStringException(999, "Server seems to have crashed - close done gracefully")); } @@ -495,25 +495,25 @@ void CRemoteSlave::run(int argc, const char * * argv) msg.append(results); catchWriteBuffer(masterSocket, msg); - LOG(MCdebugProgress, unknownJob, "Results sent from slave %d", info.replyTag); + LOG(MCdebugProgress, "Results sent from slave %d", info.replyTag); //Acknowledgement before closing down... msg.clear(); if (catchReadBuffer(masterSocket, msg, RMTTIME_RESPONSE_MASTER)) { - LOG(MCdebugProgress, unknownJob, "Terminate acknowledgement received from master for slave %d", info.replyTag); + LOG(MCdebugProgress, "Terminate acknowledgement received from master for slave %d", info.replyTag); msg.read(ok); assertex(ok); } else - LOG(MCdebugProgress, unknownJob, "No terminate acknowledgement received from master for slave %d", info.replyTag); + LOG(MCdebugProgress, "No terminate acknowledgement received from master for slave %d", info.replyTag); if (error) break; timeOut = 24*60*60*1000; } while (stayAlive); - LOG(MCdebugProgress, unknownJob, "Terminate acknowledgement received from master for slave %d", info.replyTag); + LOG(MCdebugProgress, "Terminate acknowledgement received from master for slave %d", info.replyTag); } } catch (IException * e) @@ -522,7 +522,7 @@ void CRemoteSlave::run(int argc, const char * * argv) e->Release(); } } - LOG(MCdebugProgress, unknownJob, "Stopping %s", slaveName.get()); + LOG(MCdebugProgress, "Stopping %s", slaveName.get()); } @@ -570,7 +570,7 @@ void checkForRemoteAbort(ISocket * socket) bool sendRemoteAbort(ISocket * socket) { - LOG(MCdebugInfo, unknownJob, "Send abort to remote slave (%d)", isAborting()); + LOG(MCdebugInfo, "Send abort to remote slave (%d)", isAborting()); MemoryBuffer msg; msg.append(true); diff --git a/common/thorhelper/roxiehelper.ipp b/common/thorhelper/roxiehelper.ipp index 33eaa5f662c..398c9c3902c 100644 --- a/common/thorhelper/roxiehelper.ipp +++ b/common/thorhelper/roxiehelper.ipp @@ -61,12 +61,12 @@ interface IRoxieContextLogger : extends IContextLogger { // Override base interface with versions that add prefix // We could consider moving some or all of these down into IContextLogger - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,5,0))) + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,4,0))) { StringBuffer text, prefix; getLogPrefix(prefix); text.valist_appendf(format, args); - CTXLOGa(LOG_TRACING, cat, job, code, prefix.str(), text.str()); + CTXLOGa(LOG_TRACING, cat, code, prefix.str(), text.str()); } virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) { @@ -77,7 +77,7 @@ interface IRoxieContextLogger : extends IContextLogger virtual StringBuffer &getLogPrefix(StringBuffer &ret) const = 0; virtual bool isIntercepted() const = 0; - virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *prefix, const char *text) const = 0; + virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, LogMsgCode code, const char *prefix, const char *text) const = 0; void CTXLOGae(IException *E, const char *file, unsigned line, const char *prefix, const char *format, ...) const __attribute__((format(printf, 6, 7))); virtual void CTXLOGaeva(IException *E, const char *file, unsigned line, const char *prefix, const char *format, va_list args) const = 0; virtual void CTXLOGl(LogItem *) const = 0; diff --git a/common/thorhelper/thorcommon.hpp b/common/thorhelper/thorcommon.hpp index aad74478a3e..05db7afff64 100644 --- a/common/thorhelper/thorcommon.hpp +++ b/common/thorhelper/thorcommon.hpp @@ -681,14 +681,14 @@ class CStatsContextLogger : public CSimpleInterfaceOf Owned activeSpan = getNullSpan(); mutable CRuntimeStatisticCollection stats; public: - CStatsContextLogger(const CRuntimeStatisticCollection &_mapping, const LogMsgJobInfo & _job=unknownJob) : job(_job), stats(_mapping) {} + CStatsContextLogger(const CRuntimeStatisticCollection &_mapping) : stats(_mapping) {} void reset() { stats.reset(); } - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,5,0))) + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,4,0))) { - VALOG(cat, job, code, format, args); + VALOG(cat, code, format, args); } virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) { @@ -702,7 +702,7 @@ class CStatsContextLogger : public CSimpleInterfaceOf E->errorMessage(ss.append(": ")); if (format) ss.append(": ").valist_appendf(format, args); - LOG(MCoperatorProgress, queryJob(), "%s", ss.str()); + LOG(MCoperatorProgress, "%s", ss.str()); } virtual void noteStatistic(StatisticKind kind, unsigned __int64 value) const override { @@ -764,7 +764,6 @@ class CStatsContextLogger : public CSimpleInterfaceOf { previous.updateDelta(to, stats); } - virtual const LogMsgJobInfo & queryJob() const override { return job; } }; extern THORHELPER_API bool isActivitySink(ThorActivityKind kind); diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index 903bbb52909..b10768897fa 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -1950,7 +1950,7 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo if (httpheaders && *httpheaders) { if (soapTraceLevel > 6 || master->logXML) - master->logctx.mCTXLOG("%s: Adding HTTP Headers(%s)", master->wscCallTypeText(), httpheaders); + master->logctx.mCTXLOG("%s: Adding HTTP Headers(%s)", master->wscCallTypeText(), httpheaders); request.append(httpheaders); } diff --git a/common/thorhelper/thortparse.cpp b/common/thorhelper/thortparse.cpp index 8271bd476c4..b13f368274f 100644 --- a/common/thorhelper/thortparse.cpp +++ b/common/thorhelper/thortparse.cpp @@ -574,7 +574,7 @@ bool LRActiveState::mergePackedNode(unsigned stateId, StackElement * next, bool { cur->shifted.setown(curSymbol->createMerged(nextSymbol)); #ifdef TRACING - LOG(MCdebugProgress, unknownJob, "Nodes Merged: %p = %p, %p", cur->shifted.get(), curSymbol, nextSymbol); + LOG(MCdebugProgress, "Nodes Merged: %p = %p, %p", cur->shifted.get(), curSymbol, nextSymbol); #endif return true; } @@ -704,11 +704,11 @@ StackElement * LRParser::createState(StackElement * prev, state_id nextState, Gr newState = new StackElement(shifted, nextState, prev, this); } #ifdef TRACING - LOG(MCdebugProgress, unknownJob, "%p: Push state %d symbol %d[%p] previous: %d[%p]", newState, nextState, shifted ? shifted->id : -1, shifted, prev ? prev->state : -1, prev); + LOG(MCdebugProgress, "%p: Push state %d symbol %d[%p] previous: %d[%p]", newState, nextState, shifted ? shifted->id : -1, shifted, prev ? prev->state : -1, prev); StringBuffer s; newState->getDebugText(s); s.newline(); - LOG(MCdebugProgress, unknownJob, s.str()); + LOG(MCdebugProgress, s.str()); #endif return newState; } @@ -769,7 +769,7 @@ void LRParser::doReductions(GrammarSymbol * next, bool singleToken) void LRParser::process(GrammarSymbol * next, bool singleToken) { #ifdef TRACING - LOG(MCdebugProgress, unknownJob, "Process token '%.*s' %d at position %d", next->queryEndPtr()-next->queryStartPtr(), next->queryStartPtr(), next->id, next->queryStartPtr()-rowState.inputText); + LOG(MCdebugProgress, "Process token '%.*s' %d at position %d", next->queryEndPtr()-next->queryStartPtr(), next->queryStartPtr(), next->id, next->queryStartPtr()-rowState.inputText); #endif doReductions(next, singleToken); selectEndPosition((size32_t)(next->queryEndPtr()-rowState.inputText)); @@ -791,7 +791,7 @@ void LRParser::expandReduction(StackElement & element, LRProduction * production StringBuffer s; for (unsigned i = 0; i < production->getNumSymbols(); i++) s.appendf("%p ", reducedArgs[i]); - LOG(MCdebugProgress, unknownJob, "Reduce by production %d new element %p[%s]", reduced->id, reduced.get(), s.str()); + LOG(MCdebugProgress, "Reduce by production %d new element %p[%s]", reduced->id, reduced.get(), s.str()); #endif //MORE: Some kind of recursion checking needed? if (activeOutput->okToAddReduction(nextState)) @@ -848,7 +848,7 @@ void LRParser::doShifts(LRActiveState * active, GrammarSymbol * next) if (nextState != NO_STATE) { #ifdef TRACING - LOG(MCdebugProgress, unknownJob, "Shift to state %d", nextState); + LOG(MCdebugProgress, "Shift to state %d", nextState); #endif activeOutput->addElementOwn(createState(&cur, nextState, next), chooseBest); } @@ -859,7 +859,7 @@ void LRParser::doShifts(LRActiveState * active, GrammarSymbol * next) GrammarSymbol * sym = accept->shifted; accepted.append(*LINK(sym)); #ifdef TRACING - LOG(MCdebugProgress, unknownJob, "Accepted %p[%p]", accept, sym); + LOG(MCdebugProgress, "Accepted %p[%p]", accept, sym); #endif } } diff --git a/common/workunit/workunit.cpp b/common/workunit/workunit.cpp index 7faa1dffcf5..0fe77e5c8eb 100644 --- a/common/workunit/workunit.cpp +++ b/common/workunit/workunit.cpp @@ -9585,7 +9585,7 @@ void CLocalWorkUnit::deleteTempFiles(const char *graph, bool deleteOwned, bool d if(needDelete) { const char *name = file.queryProp("@name"); - LOG(MCdebugProgress, unknownJob, "Removing workunit file %s from DFS", name); + LOG(MCdebugProgress, "Removing workunit file %s from DFS", name); queryDistributedFileDirectory().removeEntry(name, queryUserDescriptor()); toRemove.append(file); } @@ -9721,7 +9721,7 @@ void CLocalWorkUnit::releaseFile(const char *fileName) if (!name.isEmpty()&&(1 == usageCount)) { if (queryDistributedFileDirectory().removeEntry(fileName, queryUserDescriptor())) - LOG(MCdebugProgress, unknownJob, "Removed (released) file %s from DFS", name.get()); + LOG(MCdebugProgress, "Removed (released) file %s from DFS", name.get()); } } if (!more) diff --git a/dali/base/dacoven.cpp b/dali/base/dacoven.cpp index 30cd69fa001..081f5f2d73c 100644 --- a/dali/base/dacoven.cpp +++ b/dali/base/dacoven.cpp @@ -254,7 +254,7 @@ class CCovenBase: implements ICoven, public CInterface if (server) { _ServerVersion.set(ServerVersion); - LOG(MCdebugProgress, unknownJob, "Server Version = %s, required minimum client version %s", ServerVersion, MinClientVersion); + LOG(MCdebugProgress, "Server Version = %s, required minimum client version %s", ServerVersion, MinClientVersion); } else { diff --git a/dali/base/dadfs.cpp b/dali/base/dadfs.cpp index 19f10e16efd..9517ddec148 100644 --- a/dali/base/dadfs.cpp +++ b/dali/base/dadfs.cpp @@ -13763,12 +13763,12 @@ bool CDistributedFileDirectory::removePhysicalPartFiles(const char *logicalName, { unsigned start = msTick(); if (!partfile->remove()&&(copy==0)&&!islazy) // only warn about missing primary files - LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); + LOG(MCwarning, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); else { unsigned t = msTick()-start; if (t>5*1000) - LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); + LOG(MCwarning, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); } } catch (IException *e) diff --git a/dali/base/danqs.cpp b/dali/base/danqs.cpp index b2fd281d936..4fa9a6ad8ce 100644 --- a/dali/base/danqs.cpp +++ b/dali/base/danqs.cpp @@ -646,7 +646,7 @@ class CDaliNamedQueueServer: public IDaliServer, public Thread, implements IConn catch (IException *e) { // should just be aborted exceptions, but remove subscription whatever the error. - LOG(MCdebugInfo, unknownJob, e, "Named Queue Server - MQR_ADD_QUEUE notify"); + LOG(MCdebugInfo, e, "Named Queue Server - MQR_ADD_QUEUE notify"); e->Release(); stubs.remove(i,true); toremove.append(stub); diff --git a/dali/base/dasds.cpp b/dali/base/dasds.cpp index ce63df31a7a..65a1c3a77a4 100644 --- a/dali/base/dasds.cpp +++ b/dali/base/dasds.cpp @@ -1219,7 +1219,7 @@ class CDeltaWriter : implements IThreaded { exception.setown(e); StringBuffer err("Saving external (backup): "); - LOG(MCoperatorError, unknownJob, e, err.append(rL).str()); + LOG(MCoperatorError, e, err.append(rL).str()); } if (!exception.get()) break; @@ -1252,7 +1252,7 @@ class CDeltaWriter : implements IThreaded { exception.setown(e); StringBuffer err("Removing external (backup): "); - LOG(MCoperatorWarning, unknownJob, e, err.append(rL).str()); + LOG(MCoperatorWarning, e, err.append(rL).str()); } if (!exception.get()) break; @@ -1580,7 +1580,7 @@ class CLegacyBinaryFileExternal : public CExternalFile, implements IExternalHand if (*_name) s.append("in property ").append(_name); Owned e = MakeSDSException(SDSExcpt_MissingExternalFile, "%s", filename.str()); - LOG(MCoperatorWarning, unknownJob, e, s.str()); + LOG(MCoperatorWarning, e, s.str()); if (withValue) { StringBuffer str("EXTERNAL BINARY FILE: \""); @@ -1662,7 +1662,7 @@ class CXMLFileExternal : public CExternalFile, implements IExternalHandler if (name && *name) s.append("in property ").append(name); Owned e = MakeSDSException(SDSExcpt_MissingExternalFile, "%s", filename.str()); - LOG(MCoperatorWarning, unknownJob, e, s.str()); + LOG(MCoperatorWarning, e, s.str()); StringBuffer str("EXTERNAL XML FILE: \""); str.append(filename.str()).append("\" MISSING"); tree.setown(createPTree(owner.queryName())); @@ -2190,7 +2190,7 @@ void CBinaryFileExternal::readValue(const char *name, MemoryBuffer &mb) { StringBuffer s("Missing external file "); Owned e = MakeSDSException(SDSExcpt_MissingExternalFile, "%s", filename.str()); - LOG(MCoperatorWarning, unknownJob, e, s.str()); + LOG(MCoperatorWarning, e, s.str()); StringBuffer str("EXTERNAL BINARY FILE: \""); str.append(filename.str()).append("\" MISSING"); CPTValue v(str.length()+1, str.str(), false); @@ -2236,7 +2236,7 @@ void CBinaryFileExternal::read(const char *name, IPropertyTree &owner, MemoryBuf if (*_name) s.append("in property ").append(_name); Owned e = MakeSDSException(SDSExcpt_MissingExternalFile, "%s", filename.str()); - LOG(MCoperatorWarning, unknownJob, e, s.str()); + LOG(MCoperatorWarning, e, s.str()); StringBuffer str("EXTERNAL BINARY FILE: \""); str.append(filename.str()).append("\" MISSING"); CPTValue v(str.length()+1, str.str(), false); @@ -2468,7 +2468,7 @@ CServerConnection::~CServerConnection() void CServerConnection::aborted(SessionId id) { - LOG(MCdebugInfo, unknownJob, "CServerConnection: connection aborted (%" I64F "x) sessId=%" I64F "x",connectionId, id); + LOG(MCdebugInfo, "CServerConnection: connection aborted (%" I64F "x) sessId=%" I64F "x",connectionId, id); #if 0 // JCSMORE - think this is ok, but concerned about deadlock, change later. Owned lockBlock = new CLCLockBlock(((CCovenSDSManager &)manager).dataRWLock, false, readWriteTimeout, __FILE__, __LINE__); SDSManager->disconnect(connectionId, false); @@ -2685,7 +2685,7 @@ class CServerRemoteTree : public CRemoteTreeBase try { SDSManager->deleteExternal(index); } catch (IException *e) { - LOG(MCoperatorWarning, unknownJob, e, StringBuffer("Deleting external reference for ").append(queryName()).str()); + LOG(MCoperatorWarning, e, StringBuffer("Deleting external reference for ").append(queryName()).str()); e->Release(); } } @@ -4811,7 +4811,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb) mb.append(e->errorMessage(s).str()); StringBuffer clientUrl("EXCEPTION in reply to client "); mb.getSender().getEndpointHostText(clientUrl); - LOG(MCoperatorError, unknownJob, e); + LOG(MCoperatorError, e); } try { CheckTime block10("DAMP_REQUEST reply"); @@ -4837,7 +4837,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb) try { coven.reply(mb); - LOG(MCdebugInfo, unknownJob, "Failed to reply, but succeeded sending initial reply error to client"); + LOG(MCdebugInfo, "Failed to reply, but succeeded sending initial reply error to client"); } catch (IException *e) { @@ -5047,7 +5047,7 @@ IPropertyTree *loadStore(const char *storeFilename, unsigned edition, IPTreeMake catch (DALI_CATCHALL) { IException *e = MakeStringException(0, "Unknown exception - loading store file : %s", storeFilename); - LOG(MCoperatorDisaster, unknownJob, e, ""); + LOG(MCoperatorDisaster, e, ""); if (!logErrorsOnly) throw; e->Release(); @@ -5715,7 +5715,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface } virtual void saveStore(IPropertyTree *root, unsigned *_newEdition, bool currentEdition=false) { - LOG(MCdebugProgress, unknownJob, "Saving store"); + LOG(MCdebugProgress, "Saving store"); refreshStoreInfo(); @@ -5798,7 +5798,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface try { renameDelta(edition, newEdition, remoteBackupLocation); } catch (IException *e) { - LOG(MCoperatorError, unknownJob, e, "Failure handling backup"); + LOG(MCoperatorError, e, "Failure handling backup"); e->Release(); } } @@ -5828,7 +5828,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface catch (IException *e) { StringBuffer s; - LOG(MCoperatorError, unknownJob, e, s.append("Failure to backup dali to remote location: ").append(remoteBackupLocation)); + LOG(MCoperatorError, e, s.append("Failure to backup dali to remote location: ").append(remoteBackupLocation)); e->Release(); } @@ -5836,7 +5836,7 @@ class CStoreHelper : implements IStoreHelper, public CInterface *_newEdition = newEdition; done = true; - LOG(MCdebugProgress, unknownJob, "Store saved"); + LOG(MCdebugProgress, "Store saved"); } catch (IException *e) { @@ -6247,7 +6247,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort) if (!root) { StringBuffer s(storeName); - LOG(MCdebugInfo, unknownJob, "Store %d does not exist, creating new store", iStoreHelper->queryCurrentEdition()); + LOG(MCdebugInfo, "Store %d does not exist, creating new store", iStoreHelper->queryCurrentEdition()); root = new CServerRemoteTree("SDS"); } bool errors; @@ -6260,12 +6260,12 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort) if (deltaE.get()) throw LINK(deltaE); } - LOG(MCdebugInfo, unknownJob, "store and deltas loaded"); + LOG(MCdebugInfo, "store and deltas loaded"); const char *environment = config.queryProp("@environment"); if (environment && *environment) { - LOG(MCdebugInfo, unknownJob, "loading external Environment from: %s", environment); + LOG(MCdebugInfo, "loading external Environment from: %s", environment); Owned envFile = createIFile(environment); if (!envFile->exists()) throw MakeStringException(0, "'%s' does not exist", environment); @@ -6559,14 +6559,14 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort) unsigned items = treeMaker.convertQueue.ordinality(); if (items) { - LOG(MCdebugInfo, unknownJob, "Converting %d items larger than threshold size %d, to external definitions", items, externalSizeThreshold); + LOG(MCdebugInfo, "Converting %d items larger than threshold size %d, to external definitions", items, externalSizeThreshold); ForEachItemIn(i, treeMaker.convertQueue) SDSManager->writeExternal(treeMaker.convertQueue.item(i), true); saveNeeded = true; } if (saveNeeded) { - LOG(MCdebugInfo, unknownJob, "Saving converted store"); + LOG(MCdebugInfo, "Saving converted store"); SDSManager->saveStore(); } } @@ -6591,7 +6591,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort) if (remoteBackupLocation.length()) { try { validateBackup(); } - catch (IException *e) { LOG(MCoperatorError, unknownJob, e, "Validating backup"); e->Release(); } + catch (IException *e) { LOG(MCoperatorError, e, "Validating backup"); e->Release(); } StringBuffer deltaFilename(dataPath); iStoreHelper->getCurrentDeltaFilename(deltaFilename); @@ -8785,7 +8785,7 @@ bool CCovenSDSManager::fireException(IException *e) { if (handled) { - LOG(MCoperatorDisaster, unknownJob, e, "FATAL, too many exceptions"); + LOG(MCoperatorDisaster, e, "FATAL, too many exceptions"); return false; // did not successfully handle. } IERRLOG(e, "Exception while restarting or shutting down"); @@ -8822,7 +8822,7 @@ bool CCovenSDSManager::fireException(IException *e) } manager.unhandledThread.clear(); } - catch (IException *_e) { LOG(MCoperatorError, unknownJob, _e, "Exception while restarting or shutting down"); _e->Release(); } + catch (IException *_e) { LOG(MCoperatorError, _e, "Exception while restarting or shutting down"); _e->Release(); } catch (DALI_CATCHALL) { IERRLOG("Unknown exception while restarting or shutting down"); } if (!restart) { @@ -8914,7 +8914,7 @@ class CDaliSDSServer: implements IDaliServer, public CInterface try { manager->loadStore(NULL, &cancelLoad); } catch (IException *) { - LOG(MCdebugInfo, unknownJob, "Failed to load main store"); + LOG(MCdebugInfo, "Failed to load main store"); throw; } storeLoaded = true; diff --git a/dali/base/dasess.cpp b/dali/base/dasess.cpp index ba4a1e58b57..dbd9347ffce 100644 --- a/dali/base/dasess.cpp +++ b/dali/base/dasess.cpp @@ -1191,7 +1191,7 @@ class CLdapWorkItem : public Thread ret = ldapconn->getPermissions(key,obj,udesc,flags); } catch(IException *e) { - LOG(MCoperatorError, unknownJob, e, "CLdapWorkItem"); + LOG(MCoperatorError, e, "CLdapWorkItem"); e->Release(); } ready.signal(); diff --git a/dali/dfu/dfu2.cpp b/dali/dfu/dfu2.cpp index 71f9fb3c6c3..d5228c1de80 100644 --- a/dali/dfu/dfu2.cpp +++ b/dali/dfu/dfu2.cpp @@ -73,7 +73,7 @@ void cmdServer(int argc, const char *argv[]) bool actionOnAbort() { - LOG(MCprogress, unknownJob, "Exiting"); + LOG(MCprogress, "Exiting"); closeEnvironment(); closedownClientProcess(); releaseAtoms(); diff --git a/dali/dfu/dfurun.cpp b/dali/dfu/dfurun.cpp index add2dfe81ea..fb4c0a43b81 100644 --- a/dali/dfu/dfurun.cpp +++ b/dali/dfu/dfurun.cpp @@ -453,7 +453,7 @@ class CDFUengine: public CInterface, implements IDFUengine const char * pfilePath = filePath.str(); #ifdef _DEBUG - LOG(MCdebugInfo, unknownJob, "File path is '%s'", filePath.str()); + LOG(MCdebugInfo, "File path is '%s'", filePath.str()); #endif const char pathSep = filename.getPathSeparator(); @@ -488,7 +488,7 @@ class CDFUengine: public CInterface, implements IDFUengine if (env->isDropZoneRestrictionEnabled()) throwError2(DFTERR_NoMatchingDropzonePath, netaddress.str(), pfilePath); else - LOG(MCdebugInfo, unknownJob, "No matching drop zone path on '%s' to file path: '%s'", netaddress.str(), pfilePath); + LOG(MCdebugInfo, "No matching drop zone path on '%s' to file path: '%s'", netaddress.str(), pfilePath); } #ifdef _DEBUG else @@ -496,7 +496,7 @@ class CDFUengine: public CInterface, implements IDFUengine SCMStringBuffer dropZoneName; dropZone->getName(dropZoneName); - LOG(MCdebugInfo, unknownJob, "Drop zone path '%s' is %svisible in ECLWatch." + LOG(MCdebugInfo, "Drop zone path '%s' is %svisible in ECLWatch." , dropZoneName.str() , (dropZone->isECLWatchVisible() ? "" : "not ") ); diff --git a/dali/dfu/dfuserver.cpp b/dali/dfu/dfuserver.cpp index dee00b31dd7..8777cf8e4af 100644 --- a/dali/dfu/dfuserver.cpp +++ b/dali/dfu/dfuserver.cpp @@ -292,7 +292,7 @@ int main(int argc, const char *argv[]) engine->joinListeners(); if (replserver.get()) replserver->stopServer(); - LOG(MCprogress, unknownJob, "Exiting"); + LOG(MCprogress, "Exiting"); } } diff --git a/dali/ft/daft.cpp b/dali/ft/daft.cpp index e2e1cd5d1b8..051375099ac 100644 --- a/dali/ft/daft.cpp +++ b/dali/ft/daft.cpp @@ -183,7 +183,7 @@ offset_t CDistributedFileSystem::getSize(IDistributedFile * file, bool forceget, lock.queryAttributes().setPropInt64("@size", totalSize); } } - //LOG(MCdebugInfo(1000), unknownJob, "DFS: getSize(%s)=%" I64F "d", file->queryLogicalName(), totalSize); + //LOG(MCdebugInfo(1000), "DFS: getSize(%s)=%" I64F "d", file->queryLogicalName(), totalSize); return totalSize; } @@ -241,7 +241,7 @@ offset_t CDistributedFileSystem::getSize(IDistributedFilePart * part, bool force } } - //LOG(MCdebugInfo(2000), unknownJob, "DFS: getSize(%s)=%" I64F "d", part->queryPartName(), size); + //LOG(MCdebugInfo(2000), "DFS: getSize(%s)=%" I64F "d", part->queryPartName(), size); return size; } diff --git a/dali/ft/daftformat.cpp b/dali/ft/daftformat.cpp index 02040383302..529ea5e0aa5 100644 --- a/dali/ft/daftformat.cpp +++ b/dali/ft/daftformat.cpp @@ -105,7 +105,7 @@ void CPartitioner::commonCalcPartitions() if (endOffset == totalSize) lastSplit = numParts-1; if (lastSplit >= numParts) lastSplit = numParts-1; // very rare with variable length records, last file is very small or copying a couple of records 50 ways. - //LOG(MCdebugInfo, unknownJob, "commonCalcPartitions: partSize:%lld, endOffset: %lld, firstSplit: %d, lastSplit: %d ",partSize ,endOffset, firstSplit, lastSplit); + //LOG(MCdebugInfo, "commonCalcPartitions: partSize:%lld, endOffset: %lld, firstSplit: %d, lastSplit: %d ",partSize ,endOffset, firstSplit, lastSplit); JSON_DBGLOG("commonCalcPartitions: partSize:%lld, endOffset: %lld, firstSplit: %d, lastSplit: %d ",partSize ,endOffset, firstSplit, lastSplit); if (!partSeparator.isEmpty() && appendingContent) //appending to existing content, add a separator if necessary @@ -215,7 +215,7 @@ void CPartitioner::getRecordStructure(StringBuffer & _recordStructure) CSimpleFixedPartitioner::CSimpleFixedPartitioner(unsigned _recordSize, bool _noTranslation) { - LOG(MCdebugProgressDetail, unknownJob, "CSimpleFixedPartitioner::CSimpleFixedPartitioner( _recordSize:%d, _noTranslation:%d)", _recordSize, _noTranslation); + LOG(MCdebugProgressDetail, "CSimpleFixedPartitioner::CSimpleFixedPartitioner( _recordSize:%d, _noTranslation:%d)", _recordSize, _noTranslation); recordSize = _recordSize; noTranslation = _noTranslation; } @@ -241,7 +241,7 @@ void CSimpleFixedPartitioner::setPartitionRange(offset_t _totalSize, offset_t _t CSimpleBlockedPartitioner::CSimpleBlockedPartitioner(bool _noTranslation) : CSimpleFixedPartitioner(EFX_BLOCK_SIZE, _noTranslation) { - LOG(MCdebugProgressDetail, unknownJob, "CSimpleBlockedPartitioner::CSimpleBlockedPartitioner( _noTranslation:%d)", _noTranslation); + LOG(MCdebugProgressDetail, "CSimpleBlockedPartitioner::CSimpleBlockedPartitioner( _noTranslation:%d)", _noTranslation); } //---------------------------------------------------------------------------- @@ -298,7 +298,7 @@ void CInputBasePartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor { // Display progress oldInputOffset = nextInputOffset; - LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, (double)100.0*(double)nextInputOffset/(double)splitOffset); + LOG(MCdebugProgressDetail, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, (double)100.0*(double)nextInputOffset/(double)splitOffset); } inputOffset = nextInputOffset; @@ -315,7 +315,7 @@ void CInputBasePartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor if (size > bufferSize) { - LOG(MCdebugProgressDetail, unknownJob, "Split record size %d (0x%08x) is larger than the buffer size: %d", size, size, bufferSize); + LOG(MCdebugProgressDetail, "Split record size %d (0x%08x) is larger than the buffer size: %d", size, size, bufferSize); throwError2(DFTERR_WrongSplitRecordSize, size, size); } @@ -347,7 +347,7 @@ void CInputBasePartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor cursor.inputOffset = inputOffset; cursor.nextInputOffset = nextInputOffset; - LOG(MCdebugProgressDetail, unknownJob, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, 100.0); + LOG(MCdebugProgressDetail, "findSplitPoint(splitOffset:%" I64F "d) progress: %3.0f%% done.", splitOffset, 100.0); } @@ -466,7 +466,7 @@ unsigned CInputBasePartitioner::transformBlock(offset_t endOffset, TransformCurs CFixedPartitioner::CFixedPartitioner(size32_t _recordSize) : CInputBasePartitioner(0, _recordSize) { recordSize = _recordSize; - LOG(MCdebugProgressDetail, unknownJob, "CFixedPartitioner::CFixedPartitioner( recordSize:%d)", recordSize); + LOG(MCdebugProgressDetail, "CFixedPartitioner::CFixedPartitioner( recordSize:%d)", recordSize); } size32_t CFixedPartitioner::getSplitRecordSize(const byte * record, unsigned maxToRead, bool processFullBuffer) @@ -484,7 +484,7 @@ size32_t CFixedPartitioner::getTransformRecordSize(const byte * record, unsigned CBlockedPartitioner::CBlockedPartitioner() : CFixedPartitioner(EFX_BLOCK_SIZE) { - LOG(MCdebugProgressDetail, unknownJob, "CBlockedPartitioner::CBlockedPartitioner()"); + LOG(MCdebugProgressDetail, "CBlockedPartitioner::CBlockedPartitioner()"); } @@ -498,7 +498,7 @@ void CBlockedPartitioner::setTarget(IOutputProcessor * _target) CVariablePartitioner::CVariablePartitioner(bool _bigendian) : CInputBasePartitioner(sizeof(varLenType), EXPECTED_VARIABLE_LENGTH) { - LOG(MCdebugProgressDetail, unknownJob, "CVariablePartitioner::CVariablePartitioner(_bigendian:%d)", _bigendian); + LOG(MCdebugProgressDetail, "CVariablePartitioner::CVariablePartitioner(_bigendian:%d)", _bigendian); assertex(sizeof(varLenType) == 4); bigendian = _bigendian; } @@ -539,7 +539,7 @@ void CVariablePartitioner::setTarget(IOutputProcessor * _target) CRECFMvbPartitioner::CRECFMvbPartitioner(bool blocked) : CInputBasePartitioner(blocked?BDW_SIZE:RDW_SIZE, EXPECTED_VARIABLE_LENGTH) { - LOG(MCdebugProgressDetail, unknownJob, "CRECFMvbPartitioner::CRECFMvbPartitioner(blocked:%d)", blocked); + LOG(MCdebugProgressDetail, "CRECFMvbPartitioner::CRECFMvbPartitioner(blocked:%d)", blocked); isBlocked = blocked; } @@ -553,7 +553,7 @@ size32_t CRECFMvbPartitioner::getRecordSize(const byte * record, unsigned maxToR if (rest) { - LOG(MCdebugProgressDetail, unknownJob, "Wrong RECFMv RDW info: size:%d (0x%04x) rest:%d (0x%04x) at pos :%d", recordsize ,recordsize, rest, rest, unsigned (record - bufferBase()) ); + LOG(MCdebugProgressDetail, "Wrong RECFMv RDW info: size:%d (0x%04x) rest:%d (0x%04x) at pos :%d", recordsize ,recordsize, rest, rest, unsigned (record - bufferBase()) ); throwError1(DFTERR_WrongRECFMvRecordDescriptorWord, rest); } @@ -613,7 +613,7 @@ size32_t CRECFMvbPartitioner::getTransformRecordSize(const byte * record, unsign unsigned CRECFMvbPartitioner::transformBlock(offset_t endOffset, TransformCursor & cursor) { - LOG(MCdebugProgressDetail, unknownJob, "CRECFMvbPartitioner::transformBlock(offset_t endOffset: %" I64F "d (0x%016" I64F "x), TransformCursor & cursor)", endOffset ,endOffset); + LOG(MCdebugProgressDetail, "CRECFMvbPartitioner::transformBlock(offset_t endOffset: %" I64F "d (0x%016" I64F "x), TransformCursor & cursor)", endOffset ,endOffset); const byte *buffer = bufferBase(); offset_t startOffset = cursor.inputOffset; offset_t inputOffset = startOffset; @@ -680,11 +680,11 @@ unsigned CRECFMvbPartitioner::transformBlock(offset_t endOffset, TransformCursor CCsvPartitioner::CCsvPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize) { - LOG(MCdebugProgressDetail, unknownJob, "CCsvPartitioner::CCsvPartitioner(_format :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize); - LOG(MCdebugProgressDetail, unknownJob, " separator :'%s'", _format.separate.get()); - LOG(MCdebugProgressDetail, unknownJob, " quote :'%s'", _format.quote.get()); - LOG(MCdebugProgressDetail, unknownJob, " terminator:'%s'", _format.terminate.get()); - LOG(MCdebugProgressDetail, unknownJob, " escape :'%s'", _format.escape.get()); + LOG(MCdebugProgressDetail, "CCsvPartitioner::CCsvPartitioner(_format :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize); + LOG(MCdebugProgressDetail, " separator :'%s'", _format.separate.get()); + LOG(MCdebugProgressDetail, " quote :'%s'", _format.quote.get()); + LOG(MCdebugProgressDetail, " terminator:'%s'", _format.terminate.get()); + LOG(MCdebugProgressDetail, " escape :'%s'", _format.escape.get()); maxElementLength = 1; format.set(_format); @@ -700,7 +700,7 @@ CCsvPartitioner::CCsvPartitioner(const FileFormat & _format) : CInputBasePartiti if (escape && *escape) { if (quote && (*escape == *quote)) - LOG(MCdebugProgressDetail, unknownJob, "The quote ('%s') and the escape ('%s') are same, ignore escape.", quote, escape); + LOG(MCdebugProgressDetail, "The quote ('%s') and the escape ('%s') are same, ignore escape.", quote, escape); else addActionList(matcher, escape, ESCAPE, &maxElementLength); } @@ -744,14 +744,14 @@ void CCsvPartitioner::getRecordStructure(StringBuffer & _recordStructure) if (size > bufferSize) { - LOG(MCdebugProgressDetail, unknownJob, "First record size %d (0x%08x) is larger than the buffer size: %d. Please check the separator and terminator parameters.", size, size, bufferSize); + LOG(MCdebugProgressDetail, "First record size %d (0x%08x) is larger than the buffer size: %d. Please check the separator and terminator parameters.", size, size, bufferSize); throwError2(DFTERR_WrongSplitRecordSize, size, size); } else if (isFirstRow) { // Possibly reached the end of the file but the processing is still in first row // so no terminator detected - LOG(MCdebugProgressDetail, unknownJob, "%d (0x%08x) bytes processed, but there is no terminator found. Please check the separator and terminator parameters.", size, size); + LOG(MCdebugProgressDetail, "%d (0x%08x) bytes processed, but there is no terminator found. Please check the separator and terminator parameters.", size, size); throwError1(DFTERR_EndOfCsvRecordNotFound, size); } } @@ -970,7 +970,7 @@ size32_t CCsvPartitioner::getSplitRecordSize(const byte * start, unsigned maxToR throwError(DFTERR_EndOfRecordNotFound); - LOG(MCdebugProgress, unknownJob, "CSV splitRecordSize(%d) at end of file", (unsigned) (end - start)); + LOG(MCdebugProgress, "CSV splitRecordSize(%d) at end of file", (unsigned) (end - start)); if (++numOfBufferOverrun > maxNumberOfBufferOverrun) throwError1(DFTERR_EndOfCsvRecordNotFound, numOfProcessedBytes); @@ -995,7 +995,7 @@ void CCsvPartitioner::setTarget(IOutputProcessor * _target) CCsvQuickPartitioner::CCsvQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CCsvPartitioner(_format) { - LOG(MCdebugProgressDetail, unknownJob, "CCsvQuickPartitioner::CCsvQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); + LOG(MCdebugProgressDetail, "CCsvQuickPartitioner::CCsvQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); noTranslation = _noTranslation; } @@ -1050,13 +1050,13 @@ void CCsvQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor if (ensureSize == format.maxRecordSize) throw; e->Release(); - LOG(MCdebugProgress, unknownJob, "Failed to find split after reading %d", ensureSize); + LOG(MCdebugProgress, "Failed to find split after reading %d", ensureSize); ensureSize += blockSize; if (ensureSize > format.maxRecordSize) ensureSize = format.maxRecordSize; } } - LOG(MCdebugProgress, unknownJob, "Found split after reading %d", ensureSize); + LOG(MCdebugProgress, "Found split after reading %d", ensureSize); } } } @@ -1088,10 +1088,10 @@ void CCsvQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor CUtfPartitioner::CUtfPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize) { - LOG(MCdebugProgressDetail, unknownJob, "CUtfPartitioner::CUtfPartitioner(_format.type :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize); - LOG(MCdebugProgressDetail, unknownJob, " separator :'%s'", _format.separate.get()); - LOG(MCdebugProgressDetail, unknownJob, " quote :'%s'", _format.quote.get()); - LOG(MCdebugProgressDetail, unknownJob, " terminator:'%s'", _format.terminate.get()); + LOG(MCdebugProgressDetail, "CUtfPartitioner::CUtfPartitioner(_format.type :'%s', maxRecordSize:%d)", _format.getFileFormatTypeString(), _format.maxRecordSize); + LOG(MCdebugProgressDetail, " separator :'%s'", _format.separate.get()); + LOG(MCdebugProgressDetail, " quote :'%s'", _format.quote.get()); + LOG(MCdebugProgressDetail, " terminator:'%s'", _format.terminate.get()); maxElementLength = 1; format.set(_format); @@ -1311,7 +1311,7 @@ size32_t CUtfPartitioner::getSplitRecordSize(const byte * start, unsigned maxToR numOfProcessedBytes += (unsigned)(end - start); - LOG(MCdebugProgress, unknownJob, "UTF splitRecordSize(%d) at end of file", (unsigned) (end - start)); + LOG(MCdebugProgress, "UTF splitRecordSize(%d) at end of file", (unsigned) (end - start)); if (++numOfBufferOverrun > maxNumberOfBufferOverrun) throwError1(DFTERR_EndOfUtfRecordNotFound, numOfProcessedBytes); @@ -1332,7 +1332,7 @@ void CUtfPartitioner::setTarget(IOutputProcessor * _target) CUtfQuickPartitioner::CUtfQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CUtfPartitioner(_format) { - LOG(MCdebugProgressDetail, unknownJob, "CUtfQuickPartitioner::CUtfQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); + LOG(MCdebugProgressDetail, "CUtfQuickPartitioner::CUtfQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); noTranslation = _noTranslation; } @@ -1389,13 +1389,13 @@ void CUtfQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor if (ensureSize == format.maxRecordSize) throw; e->Release(); - LOG(MCdebugProgress, unknownJob, "Failed to find split after reading %d", ensureSize); + LOG(MCdebugProgress, "Failed to find split after reading %d", ensureSize); ensureSize += blockSize; if (ensureSize > format.maxRecordSize) ensureSize = format.maxRecordSize; } } - LOG(MCdebugProgress, unknownJob, "Found split after reading %d", ensureSize); + LOG(MCdebugProgress, "Found split after reading %d", ensureSize); } } } @@ -1463,7 +1463,7 @@ size32_t BufferedDirectReader::ensure(size32_t required) XmlSplitter::XmlSplitter(const FileFormat & format) { - LOG(MCdebugProgressDetail, unknownJob, "XmlSplitter::XmlSplitter(_format.type :'%s', format.rowTag:'%s')", format.getFileFormatTypeString(), format.rowTag.get()); + LOG(MCdebugProgressDetail, "XmlSplitter::XmlSplitter(_format.type :'%s', format.rowTag:'%s')", format.getFileFormatTypeString(), format.rowTag.get()); maxElementLength = 1; utfFormat = getUtfFormatType(format.type); StringBuffer openTag, closeTag, endTag, endCloseTag; @@ -1686,7 +1686,7 @@ offset_t XmlSplitter::getFooterLength(BufferedDirectReader & reader, offset_t si CJsonInputPartitioner::CJsonInputPartitioner(const FileFormat & _format) { - LOG(MCdebugProgressDetail, unknownJob, "CJsonInputPartitioner::CJsonInputPartitioner(format.type :'%s', unitSize:%d)", _format.getFileFormatTypeString(), _format.getUnitSize()); + LOG(MCdebugProgressDetail, "CJsonInputPartitioner::CJsonInputPartitioner(format.type :'%s', unitSize:%d)", _format.getFileFormatTypeString(), _format.getUnitSize()); format.set(_format); CriticalBlock block(openfilecachesect); @@ -1750,7 +1750,7 @@ CJsonPartitioner::CJsonPartitioner(const FileFormat & _format) : CJsonInputParti CXmlPartitioner::CXmlPartitioner(const FileFormat & _format) : CInputBasePartitioner(_format.maxRecordSize, _format.maxRecordSize), splitter(_format) { - LOG(MCdebugProgressDetail, unknownJob, "CXmlPartitioner::CXmlPartitioner(_format.type :'%s', unitSize:%d)", _format.getFileFormatTypeString(), format.getUnitSize()); + LOG(MCdebugProgressDetail, "CXmlPartitioner::CXmlPartitioner(_format.type :'%s', unitSize:%d)", _format.getFileFormatTypeString(), format.getUnitSize()); format.set(_format); unitSize = format.getUnitSize(); utfFormat = getUtfFormatType(format.type); @@ -1782,7 +1782,7 @@ void CXmlPartitioner::setTarget(IOutputProcessor * _target) CXmlQuickPartitioner::CXmlQuickPartitioner(const FileFormat & _format, bool _noTranslation) : CXmlPartitioner(_format) { - LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::CXmlQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); + LOG(MCdebugProgressDetail, "CXmlQuickPartitioner::CXmlQuickPartitioner(_format.type :'%s', _noTranslation:%d)", _format.getFileFormatTypeString(), _noTranslation); noTranslation = _noTranslation; } @@ -1792,7 +1792,7 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor numInBuffer = bufferOffset = 0; if (splitOffset != 0) { - LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint(splitOffset:%" I64F "d)", splitOffset); + LOG(MCdebugProgressDetail, "CXmlQuickPartitioner::findSplitPoint(splitOffset:%" I64F "d)", splitOffset); unsigned delta = (unsigned)(splitOffset & (unitSize-1)); if (delta) splitOffset += (unitSize - delta); @@ -1818,16 +1818,16 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor } if (sizeAvailable >= format.maxRecordSize) { - LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint: record size (>%d bytes) is larger than expected maxRecordSize (%d bytes) [and blockSize (%d bytes)]", sizeRecord, format.maxRecordSize, blockSize); + LOG(MCdebugProgressDetail, "CXmlQuickPartitioner::findSplitPoint: record size (>%d bytes) is larger than expected maxRecordSize (%d bytes) [and blockSize (%d bytes)]", sizeRecord, format.maxRecordSize, blockSize); throwError3(DFTERR_EndOfXmlRecordNotFound, splitOffset+bufferOffset, sizeRecord, format.maxRecordSize); } - LOG(MCdebugProgress, unknownJob, "Failed to find split after reading %d", ensureSize); + LOG(MCdebugProgress, "Failed to find split after reading %d", ensureSize); ensureSize += blockSize; if (ensureSize > format.maxRecordSize) ensureSize = format.maxRecordSize; ensureBuffered(ensureSize); } - LOG(MCdebugProgress, unknownJob, "Found split after reading %d", ensureSize); + LOG(MCdebugProgress, "Found split after reading %d", ensureSize); } else if (splitOffset - thisOffset < thisSize) throwError2(DFTERR_UnexpectedReadFailure, fullPath.get(), splitOffset-thisOffset+thisHeaderSize); @@ -1842,7 +1842,7 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor CRemotePartitioner::CRemotePartitioner(FileSprayer &_sprayer, const SocketEndpoint & _ep, const FileFormat & _srcFormat, const FileFormat & _tgtFormat, const char * _slave, const char *_wuid) : wuid(_wuid), sprayer(_sprayer) { - LOG(MCdebugProgressDetail, unknownJob, "CRemotePartitioner::CRemotePartitioner(_srcFormat.type :'%s', _tgtFormat.type:'%s', _slave:'%s', _wuid:'%s')", _srcFormat.getFileFormatTypeString(), _tgtFormat.getFileFormatTypeString(), _slave, _wuid); + LOG(MCdebugProgressDetail, "CRemotePartitioner::CRemotePartitioner(_srcFormat.type :'%s', _tgtFormat.type:'%s', _slave:'%s', _wuid:'%s')", _srcFormat.getFileFormatTypeString(), _tgtFormat.getFileFormatTypeString(), _slave, _wuid); ep.set(_ep); srcFormat.set(_srcFormat); tgtFormat.set(_tgtFormat); @@ -1887,7 +1887,6 @@ void CRemotePartitioner::callRemote() HANDLE localFtSlaveHandle = 0; // used only if ftslave is launched on this host try { - LogMsgJobInfo job(unknownJob); StringBuffer url, tmp; ep.getEndpointHostText(url); @@ -1931,7 +1930,7 @@ void CRemotePartitioner::callRemote() sendDaFsFtSlaveCmd(socket, msg); } - LOG(MCdebugProgressDetail, job, "Remote partition part %s[%d]", url.str(), whichInput); + LOG(MCdebugProgressDetail, "Remote partition part %s[%d]", url.str(), whichInput); msg.clear(); if (!catchReadBuffer(socket, msg, FTTIME_PARTITION)) @@ -1952,7 +1951,7 @@ void CRemotePartitioner::callRemote() catchWriteBuffer(socket, msg); } - LOG(MCdebugProgressDetail, job, "Remote partition calculated %s[%d] ok(%d)", url.str(), whichInput, ok); + LOG(MCdebugProgressDetail, "Remote partition calculated %s[%d] ok(%d)", url.str(), whichInput, ok); } catch (IException * e) { @@ -2300,7 +2299,7 @@ IFormatProcessor * createFormatProcessor(const FileFormat & srcFormat, const Fil { IFormatProcessor * partitioner; bool sameFormats = srcFormat.equals(tgtFormat); - LOG(MCdebugProgressDetail, unknownJob, "createFormatProcessor(srcFormat:'%s', tgtFormat:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats); + LOG(MCdebugProgressDetail, "createFormatProcessor(srcFormat:'%s', tgtFormat:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats); switch (srcFormat.type) { case FFTfixed: @@ -2360,7 +2359,7 @@ IFormatProcessor * createFormatProcessor(const FileFormat & srcFormat, const Fil IOutputProcessor * createOutputProcessor(const FileFormat & format) { - LOG(MCdebugProgressDetail, unknownJob, "createOutputProcessor(format.type:'%s')", format.getFileFormatTypeString()); + LOG(MCdebugProgressDetail, "createOutputProcessor(format.type:'%s')", format.getFileFormatTypeString()); switch (format.type) { case FFTfixed: @@ -2382,7 +2381,7 @@ IOutputProcessor * createOutputProcessor(const FileFormat & format) IFormatPartitioner * createFormatPartitioner(FileSprayer &sprayer, const SocketEndpoint & ep, const FileFormat & srcFormat, const FileFormat & tgtFormat, bool calcOutput, const char * slave, const char *wuid) { bool sameFormats = sameEncoding(srcFormat, tgtFormat); - LOG(MCdebugProgressDetail, unknownJob, "createFormatProcessor(srcFormat.type:'%s', tgtFormat.type:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats); + LOG(MCdebugProgressDetail, "createFormatProcessor(srcFormat.type:'%s', tgtFormat.type:'%s', calcOutput:%d, sameFormats:%d)", srcFormat.getFileFormatTypeString(), tgtFormat.getFileFormatTypeString(), calcOutput, sameFormats); if (sameFormats) { switch (srcFormat.type) diff --git a/dali/ft/daftformat.ipp b/dali/ft/daftformat.ipp index 34c2e85328e..3db0465ee24 100644 --- a/dali/ft/daftformat.ipp +++ b/dali/ft/daftformat.ipp @@ -379,7 +379,7 @@ public: JsonSplitter(const FileFormat & format, IFileIOStream &stream) : headerLength(0), pathPos(0), tangent(0), rowDepth(0), rowStart((offset_t)-1), rowEnd(0), footerLength((offset_t)-1), newRowSet(true), hasRootArray(false) { - LOG(MCdebugProgressDetail, unknownJob, "JsonSplitter::JsonSplitter(format.type :'%s', rowPath:'%s')", format.getFileFormatTypeString(), format.rowTag.get()); + LOG(MCdebugProgressDetail, "JsonSplitter::JsonSplitter(format.type :'%s', rowPath:'%s')", format.getFileFormatTypeString(), format.rowTag.get()); size = stream.size(); const char *rowPath = format.rowTag; diff --git a/dali/ft/daftprogress.cpp b/dali/ft/daftprogress.cpp index 5070d8614a0..a83a81ec1a1 100644 --- a/dali/ft/daftprogress.cpp +++ b/dali/ft/daftprogress.cpp @@ -136,11 +136,11 @@ void DemoProgress::displayProgress(unsigned percentDone, unsigned secsLeft, cons unsigned kbPerSecondAve, unsigned kbPerSecondRate, unsigned numNodes) { - LOG(MCdebugProgress, unknownJob, "Progress: %d%% done, %s left. (%" I64F "d/%" I64F "d%s @Ave(%dKB/s) Rate(%dKB/s) [%d/%d]", + LOG(MCdebugProgress, "Progress: %d%% done, %s left. (%" I64F "d/%" I64F "d%s @Ave(%dKB/s) Rate(%dKB/s) [%d/%d]", percentDone, timeLeft, scaledDone, scaledTotal, scale, kbPerSecondAve, kbPerSecondRate, numNodes, totalNodes); } void DemoProgress::displaySummary(const char * timeTaken, unsigned kbPerSecond) { - LOG(MCdebugProgress, unknownJob, "Summary: Total time taken %s, Average transfer %dKB/sec", timeTaken, kbPerSecond); + LOG(MCdebugProgress, "Summary: Total time taken %s, Average transfer %dKB/sec", timeTaken, kbPerSecond); } diff --git a/dali/ft/filecopy.cpp b/dali/ft/filecopy.cpp index 5802a8bf1c5..ca0668160b8 100644 --- a/dali/ft/filecopy.cpp +++ b/dali/ft/filecopy.cpp @@ -424,7 +424,7 @@ bool FileTransferThread::launchFtSlaveCmd() newProgress.deserializeExtra(msg, 2); sprayer.updateProgress(newProgress); - LOG(MCdebugProgress(10000), job, "Update %s: %d %" I64F "d->%" I64F "d", url.str(), newProgress.whichPartition, newProgress.inputLength, newProgress.outputLength); + LOG(MCdebugProgress(10000), "Update %s: %d %" I64F "d->%" I64F "d", url.str(), newProgress.whichPartition, newProgress.inputLength, newProgress.outputLength); if (isAborting()) { if (!sendRemoteAbort(socket)) @@ -434,7 +434,7 @@ bool FileTransferThread::launchFtSlaveCmd() msg.read(ok); setErrorOwn(deserializeException(msg)); - LOG(MCdebugProgressDetail, job, "Finished generating part %s [%p] ok(%d) error(%d)", url.str(), this, (int)ok, (int)(error!=NULL)); + LOG(MCdebugProgressDetail, "Finished generating part %s [%p] ok(%d) error(%d)", url.str(), this, (int)ok, (int)(error!=NULL)); // if communicating with ftslave, the process has a final ack wait if (sprayer.useFtSlave) @@ -463,7 +463,7 @@ bool FileTransferThread::launchFtSlaveCmd() bool FileTransferThread::performTransfer() { - LOG(MCdebugProgress, job, "Transferring part %s [%p]", url.str(), this); + LOG(MCdebugProgress, "Transferring part %s [%p]", url.str(), this); started = true; allDone = true; if (sprayer.isSafeMode || action == FTactionpush) @@ -493,19 +493,19 @@ bool FileTransferThread::performTransfer() if (allDone) { - LOG(MCdebugInfo, job, "Creation of part %s already completed", url.str()); + LOG(MCdebugInfo, "Creation of part %s already completed", url.str()); return true; } if (partition.empty()) { - LOG(MCdebugInfo, job, "No elements to transfer for this slave"); + LOG(MCdebugInfo, "No elements to transfer for this slave"); return true; } - LOG(MCdebugProgressDetail, job, "Start generate part %s [%p]", url.str(), this); + LOG(MCdebugProgressDetail, "Start generate part %s [%p]", url.str(), this); bool ok = launchFtSlaveCmd(); - LOG(MCdebugProgressDetail, job, "Stopped generate part %s [%p]", url.str(), this); + LOG(MCdebugProgressDetail, "Stopped generate part %s [%p]", url.str(), this); allDone = true; return ok; @@ -530,7 +530,7 @@ bool FileTransferThread::transferAndSignal() } catch (IException * e) { - FLLOG(MCexception(e), job, e, "Transferring files"); + FLLOG(MCexception(e), e, "Transferring files"); setErrorOwn(e); } } @@ -674,7 +674,6 @@ FileSprayer::FileSprayer(IPropertyTree * _options, IPropertyTree * _progress, IR allowRecovery = !options->getPropBool(ANnoRecover) && !querySplitPrefix(); isRecovering = allowRecovery && progressTree->hasProp(ANhasProgress); isSafeMode = options->getPropBool(ANsafe); - job = unknownJob; progressReport = NULL; abortChecker = NULL; sizeToBeRead = 0; @@ -692,7 +691,7 @@ FileSprayer::FileSprayer(IPropertyTree * _options, IPropertyTree * _progress, IR copyCompressed = false; transferBufferSize = options->getPropInt(ANtransferBufferSize); if (transferBufferSize) - LOG(MCdebugProgressDetail, job, "Using transfer buffer size %d", transferBufferSize); + LOG(MCdebugProgressDetail, "Using transfer buffer size %d", transferBufferSize); else // zero is default transferBufferSize = DEFAULT_STD_BUFFER_SIZE; progressDone = false; @@ -710,7 +709,7 @@ FileSprayer::FileSprayer(IPropertyTree * _options, IPropertyTree * _progress, IR fileUmask = (int)strtol(umaskStr, &eptr, 8); if (errno || *eptr != '\0') { - LOG(MCdebugInfo, job, "Invalid umask value <%s> ignored", umaskStr); + LOG(MCdebugInfo, "Invalid umask value <%s> ignored", umaskStr); fileUmask = -1; } else @@ -763,7 +762,7 @@ void FileSprayer::addEmptyFilesToPartition(unsigned from, unsigned to) { for (unsigned i = from; i < to ; i++) { - LOG(MCdebugProgressDetail, job, "Insert a dummy entry for target %d", i); + LOG(MCdebugProgressDetail, "Insert a dummy entry for target %d", i); PartitionPoint & next = createLiteral(0, NULL, 0); next.whichOutput = i; partition.append(next); @@ -791,7 +790,7 @@ void FileSprayer::afterTransfer() { if (calcInputCRC()) { - LOG(MCdebugProgressDetail, job, "Checking input CRCs"); + LOG(MCdebugProgressDetail, "Checking input CRCs"); CRC32Merger partCRC; unsigned startCurSource = 0; @@ -802,7 +801,7 @@ void FileSprayer::afterTransfer() if (!curProgress.hasInputCRC) { - LOG(MCdebugProgressDetail, job, "Could not calculate input CRCs - cannot check"); + LOG(MCdebugProgressDetail, "Could not calculate input CRCs - cannot check"); break; } partCRC.addChildCRC(curProgress.inputLength, curProgress.inputCRC, false); @@ -969,9 +968,9 @@ void FileSprayer::beforeTransfer() } } catch (IException *e) { - FLLOG(MCexception(e), job, e, "Creating Directory"); + FLLOG(MCexception(e), e, "Creating Directory"); e->Release(); - LOG(MCdebugInfo, job, "Ignoring create directory error"); + LOG(MCdebugInfo, "Ignoring create directory error"); } // If pushing files, and not recovering, then need to delete the target files, because the slaves might be writing in any order @@ -1041,7 +1040,7 @@ void FileSprayer::beforeTransfer() if (machine->getOS() == MachineOsW2K) { throttleNicSpeed = machine->getNicSpeedMbitSec(); - LOG(MCdebugInfo, job, "Throttle target speed to %dMbit/sec", throttleNicSpeed); + LOG(MCdebugInfo, "Throttle target speed to %dMbit/sec", throttleNicSpeed); } } } @@ -1082,7 +1081,7 @@ bool FileSprayer::calcInputCRC() void FileSprayer::calculateOne2OnePartition() { - LOG(MCdebugProgressDetail, job, "Setting up one2One partition"); + LOG(MCdebugProgressDetail, "Setting up one2One partition"); if (sources.ordinality() != targets.ordinality()) throwError(DFTERR_ReplicateNumPartsDiffer); if (!srcFormat.equals(tgtFormat)) @@ -1153,7 +1152,7 @@ void FileSprayer::calculateSplitPrefixPartition(const char * splitPrefix) if (!srcFormat.equals(tgtFormat)) throwError(DFTERR_SplitPrefixSameFormat); - LOG(MCdebugProgressDetail, job, "Setting up split prefix partition"); + LOG(MCdebugProgressDetail, "Setting up split prefix partition"); Owned target = &targets.popGet(); // remove target, add lots of new ones RemoteFilename blobTarget; @@ -1190,7 +1189,7 @@ void FileSprayer::calculateSplitPrefixPartition(const char * splitPrefix) void FileSprayer::calculateMany2OnePartition() { - LOG(MCdebugProgressDetail, job, "Setting up many2one partition"); + LOG(MCdebugProgressDetail, "Setting up many2one partition"); const char *partSeparator = srcFormat.getPartSeparatorString(); offset_t partSeparatorLength = ( partSeparator == nullptr ? 0 : strlen(partSeparator)); offset_t lastContentLength = 0; @@ -1222,7 +1221,7 @@ void FileSprayer::calculateMany2OnePartition() void FileSprayer::calculateNoSplitPartition() { - LOG(MCdebugProgressDetail, job, "Setting up no split partition"); + LOG(MCdebugProgressDetail, "Setting up no split partition"); if (!usePullOperation() && !srcFormat.equals(tgtFormat)) throwError(DFTERR_NoSplitPushChangeFormat); @@ -1285,7 +1284,7 @@ void FileSprayer::calculateNoSplitPartition() void FileSprayer::calculateSprayPartition() { - LOG(MCdebugProgressDetail, job, "Calculating N:M partition"); + LOG(MCdebugProgressDetail, "Calculating N:M partition"); bool calcOutput = needToCalcOutput(); FormatPartitionerArray partitioners; @@ -1347,7 +1346,7 @@ IFormatPartitioner * FileSprayer::createPartitioner(aindex_t index, bool calcOut StringBuffer remoteFilename; FilePartInfo & cur = sources.item(index); cur.filename.getRemotePath(remoteFilename.clear()); - LOG(MCdebugInfoDetail, job, "Partition %d(%s)", index, remoteFilename.str()); + LOG(MCdebugInfoDetail, "Partition %d(%s)", index, remoteFilename.str()); srcFormat.quotedTerminator = options->getPropBool("@quotedTerminator", true); const SocketEndpoint & ep = cur.filename.queryEndpoint(); @@ -1379,7 +1378,7 @@ void FileSprayer::examineCsvStructure() storeCsvRecordStructure(*partitioner); } else - LOG(MCdebugInfoDetail, job, "No source CSV file to examine."); + LOG(MCdebugInfoDetail, "No source CSV file to examine."); } void FileSprayer::calculateOutputOffsets() @@ -1670,7 +1669,7 @@ void FileSprayer::analyseFileHeaders(bool setcurheadersize) FilePartInfo & cur = sources.item(idx); StringBuffer s; cur.filename.getPath(s); - LOG(MCdebugInfo, job, "Examine header of file %s", s.str()); + LOG(MCdebugInfo, "Examine header of file %s", s.str()); Owned file = createIFile(cur.filename); Owned io = file->open(IFOread); @@ -1928,14 +1927,14 @@ void FileSprayer::displayPartition() #ifdef _DEBUG if ((partition.item(idx).whichInput >= 0) && (partition.item(idx).whichInput < sources.ordinality()) ) - LOG(MCdebugInfoDetail, unknownJob, + LOG(MCdebugInfoDetail, " Header size: %" I64F "u, XML header size: %" I64F "u, XML footer size: %" I64F "u", sources.item(partition.item(idx).whichInput).headerSize, sources.item(partition.item(idx).whichInput).xmlHeaderLength, sources.item(partition.item(idx).whichInput).xmlFooterLength ); else - LOG(MCdebugInfoDetail, unknownJob," No source file for this partition"); + LOG(MCdebugInfoDetail, " No source file for this partition"); #endif } } @@ -1963,7 +1962,7 @@ void FileSprayer::gatherFileSizes(bool errorIfMissing) { FilePartInfoArray fileSizeQueue; - LOG(MCdebugProgress, job, "Start gathering file sizes..."); + LOG(MCdebugProgress, "Start gathering file sizes..."); ForEachItemIn(idx, sources) { @@ -1973,7 +1972,7 @@ void FileSprayer::gatherFileSizes(bool errorIfMissing) } gatherFileSizes(fileSizeQueue, errorIfMissing); - LOG(MCdebugProgress, job, "Finished gathering file sizes..."); + LOG(MCdebugProgress, "Finished gathering file sizes..."); } void FileSprayer::afterGatherFileSizes() @@ -1985,7 +1984,7 @@ void FileSprayer::afterGatherFileSizes() { FilePartInfo & cur = sources.item(idx2); - LOG(MCdebugProgress, job, "%9u:%s (size: %llu bytes)", + LOG(MCdebugProgress, "%9u:%s (size: %llu bytes)", idx2, cur.filename.getTail(tailStr.clear()).str(), cur.size ); cur.offset = totalSize; @@ -1999,8 +1998,8 @@ void FileSprayer::afterGatherFileSizes() throwError2(DFTERR_InputIsInvalidMultiple, cur.filename.getRemotePath(s).str(), srcFormat.getUnitSize()); } } - LOG(MCdebugProgress, job, "----------------------------------------------"); - LOG(MCdebugProgress, job, "All together: %llu bytes in %u file(s)", totalSize, sources.ordinality()); + LOG(MCdebugProgress, "----------------------------------------------"); + LOG(MCdebugProgress, "All together: %llu bytes in %u file(s)", totalSize, sources.ordinality()); } } @@ -2016,7 +2015,7 @@ void FileSprayer::gatherFileSizes(FilePartInfoArray & fileSizeQueue, bool errorI unsigned numThreads = (unsigned)sqrt((float)fileSizeQueue.ordinality()); if (numThreads>20) numThreads = 20; - LOG(MCdebugProgress, job, "Gathering %d file sizes on %d threads", fileSizeQueue.ordinality(), numThreads); + LOG(MCdebugProgress, "Gathering %d file sizes on %d threads", fileSizeQueue.ordinality(), numThreads); unsigned idx; for (idx = 0; idx < numThreads; idx++) threads.append(*new FileSizeThread(fileSizeQueue, fileSizeCS, compressedInput&&!copyCompressed, errorIfMissing)); @@ -2098,7 +2097,7 @@ void FileSprayer::gatherMissingSourceTarget(IFileDescriptor * source) } else if (secondarySize != -1) { - LOG(MCwarning, unknownJob, "Replicate - primary and secondary copies have different sizes (%" I64F "d v %" I64F "d) for part %u", primarySize, secondarySize, idx); + LOG(MCwarning, "Replicate - primary and secondary copies have different sizes (%" I64F "d v %" I64F "d) for part %u", primarySize, secondarySize, idx); continue; // ignore copy } } @@ -2106,7 +2105,7 @@ void FileSprayer::gatherMissingSourceTarget(IFileDescriptor * source) { if (primarySize == -1) { - LOG(MCwarning, unknownJob, "Replicate - neither primary or secondary copies exist for part %u", idx); + LOG(MCwarning, "Replicate - neither primary or secondary copies exist for part %u", idx); primarySize = 0; // to stop later failure to gather the file size } continue; // ignore copy @@ -2482,7 +2481,7 @@ void FileSprayer::insertHeaders() } addPrefix(filePrefix.length(), filePrefix.toByteArray(), idx, partitionWork); } - LOG(MCdebugProgress, job, "Publish headers"); + LOG(MCdebugProgress, "Publish headers"); partition.swapWith(partitionWork); } } @@ -2519,7 +2518,7 @@ void FileSprayer::calcNumConcurrentTransfers() numConcurrentTransfers = numTransferParts/3; if (numConcurrentTransfers > numTransferParts) numConcurrentTransfers = numTransferParts; - LOG(MCdebugInfo, job, "numTransferParts: %u, numConcurrentTransfers: %u", numTransferParts, numConcurrentTransfers); + LOG(MCdebugInfo, "numTransferParts: %u, numConcurrentTransfers: %u", numTransferParts, numConcurrentTransfers); } void FileSprayer::performTransfer() @@ -2541,7 +2540,7 @@ void FileSprayer::performTransfer() progressReport->setRange(getSizeReadAlready(), sizeToBeRead, transferSlaves.ordinality()); - LOG(MCdebugInfo, job, "Begin to transfer parts (%d threads)\n", numConcurrentTransfers); + LOG(MCdebugInfo, "Begin to transfer parts (%d threads)\n", numConcurrentTransfers); //Throttle maximum number of concurrent transfers by starting n threads, and //then waiting for one to complete before going on to the next @@ -2588,7 +2587,7 @@ void FileSprayer::performTransfer() void FileSprayer::pullParts() { bool needCalcCRC = calcCRC(); - LOG(MCdebugInfoDetail, job, "Calculate CRC = %d", needCalcCRC); + LOG(MCdebugInfoDetail, "Calculate CRC = %d", needCalcCRC); ForEachItemIn(idx, targets) { FileTransferThread & next = * new FileTransferThread(*this, FTactionpull, targets.item(idx).filename.queryEndpoint(), needCalcCRC, wuid); @@ -2610,7 +2609,7 @@ void FileSprayer::pullParts() void FileSprayer::pushWholeParts() { bool needCalcCRC = calcCRC(); - LOG(MCdebugInfoDetail, job, "Calculate CRC = %d", needCalcCRC); + LOG(MCdebugInfoDetail, "Calculate CRC = %d", needCalcCRC); //Create a slave for each of the target files, but execute it on the node corresponding to the first source file //For container mode this will need to execute on this node, or on a load balanced service ForEachItemIn(idx, targets) @@ -2662,7 +2661,7 @@ void FileSprayer::pushParts() void FileSprayer::transferUsingAPI(IAPICopyClient * copyClient) { - LOG(MCdebugInfo, job, "Transfer files using api: %s", copyClient->name()); + LOG(MCdebugInfo, "Transfer files using api: %s", copyClient->name()); OwnedPointerArrayOf apiClients; unsigned failCount = 0; @@ -2773,7 +2772,7 @@ void FileSprayer::transferUsingAPI(IAPICopyClient * copyClient) void FileSprayer::removeSource() { - LOG(MCwarning, job, "Source file removal not yet implemented"); + LOG(MCwarning, "Source file removal not yet implemented"); } bool FileSprayer::restorePartition() @@ -2940,7 +2939,7 @@ void FileSprayer::setSource(IFileDescriptor * source, unsigned copy, unsigned mi } if (sources.ordinality() == 0) - LOG(MCuserWarning, unknownJob, "The wildcarded source did not match any filenames"); + LOG(MCuserWarning, "The wildcarded source did not match any filenames"); // throwError(DFTERR_NoFilesMatchWildcard); //Now get the size of the files directly (to check they exist). If they don't exist then switch to the backup instead. @@ -3005,7 +3004,7 @@ void FileSprayer::setTarget(IDistributedFile * target) compressOutput = target->isCompressed(); - LOG(MCdebugInfo, unknownJob, "FileSprayer::setTarget: compressedInput:%s, compressOutput:%s", + LOG(MCdebugInfo, "FileSprayer::setTarget: compressedInput:%s, compressOutput:%s", boolToStr(compressedInput), boolToStr(compressOutput)); @@ -3119,7 +3118,7 @@ void FileSprayer::waitForTransferSem(Semaphore & sem) unsigned timeSinceProgress = msTick() - lastProgressTick; if (timeSinceProgress > EXPECTED_RESPONSE_TIME) { - LOG(MCwarning, unknownJob, "No response from any slaves in last %d seconds.", timeSinceProgress/1000); + LOG(MCwarning, "No response from any slaves in last %d seconds.", timeSinceProgress/1000); CriticalBlock block(soFarCrit); StringBuffer list; @@ -3158,7 +3157,7 @@ bool FileSprayer::isAborting() { if (abortChecker->abortRequested()) { - LOG(MCdebugInfo, unknownJob, "Abort requested via callback"); + LOG(MCdebugInfo, "Abort requested via callback"); aborting = true; } lastAbortCheckTick = nowTick; @@ -3258,15 +3257,15 @@ void FileSprayer::spray() progressTree->setPropBool("@noFileMatch", true); } - LOG(MCdebugInfo, job, "compressedInput:%d, compressOutput:%d", compressedInput, compressOutput); - LOG(MCdebugInfo, job, "noCommon:%s", boolToStr(options->getPropBool(ANnocommon))); - LOG(MCdebugInfo, job, "maxConnections option:%d", options->getPropInt(ANmaxConnections)); + LOG(MCdebugInfo, "compressedInput:%d, compressOutput:%d", compressedInput, compressOutput); + LOG(MCdebugInfo, "noCommon:%s", boolToStr(options->getPropBool(ANnocommon))); + LOG(MCdebugInfo, "maxConnections option:%d", options->getPropInt(ANmaxConnections)); LocalAbortHandler localHandler(daftAbortHandler); if (allowRecovery && progressTree->getPropBool(ANcomplete)) { - LOG(MCdebugInfo, job, "Command completed successfully in previous invocation"); + LOG(MCdebugInfo, "Command completed successfully in previous invocation"); return; } @@ -3315,11 +3314,11 @@ void FileSprayer::spray() if (restorePartition()) { - LOG(MCdebugProgress, job, "Partition restored from recovery information"); + LOG(MCdebugProgress, "Partition restored from recovery information"); } else { - LOG(MCdebugProgress, job, "Calculate partition information"); + LOG(MCdebugProgress, "Calculate partition information"); if (replicate || copySource) calculateOne2OnePartition(); else if (!allowSplit()) @@ -3337,7 +3336,7 @@ void FileSprayer::spray() assignPartitionFilenames(); // assign source filenames - used in insertHeaders.. if (!replicate && !copySource) { - LOG(MCdebugProgress, job, "Insert headers"); + LOG(MCdebugProgress, "Insert headers"); insertHeaders(); } addEmptyFilesToPartition(); @@ -3395,7 +3394,7 @@ void FileSprayer::spray() copyEventText.append(distributedTarget->queryLogicalName()); //MORE: use new interface to send 'file copied' event - //LOG(MCevent, unknownJob, EVENT_FILECOPIED, copyEventText.str()); + //LOG(MCevent, EVENT_FILECOPIED, copyEventText.str()); cleanupRecovery(); } @@ -3936,7 +3935,7 @@ bool FileSprayer::calcUsePull() const if (allowRecovery && progressTree->hasProp(ANpull)) { bool usePull = progressTree->getPropBool(ANpull); - LOG(MCdebugInfo, job, "Pull = %d from recovery", (int)usePull); + LOG(MCdebugInfo, "Pull = %d from recovery", (int)usePull); return usePull; } @@ -3945,12 +3944,12 @@ bool FileSprayer::calcUsePull() const if (options->getPropBool(ANpull, false)) { - LOG(MCdebugInfo, job, "Use pull since explicitly specified"); + LOG(MCdebugInfo, "Use pull since explicitly specified"); return true; } if (options->getPropBool(ANpush, false)) { - LOG(MCdebugInfo, job, "Use push since explicitly specified"); + LOG(MCdebugInfo, "Use push since explicitly specified"); return false; } @@ -3960,7 +3959,7 @@ bool FileSprayer::calcUsePull() const { StringBuffer s; sources.item(idx2).filename.queryIP().getHostText(s); - LOG(MCdebugInfo, job, "Use pull operation because %s cannot push", s.str()); + LOG(MCdebugInfo, "Use pull operation because %s cannot push", s.str()); return true; } } @@ -3968,7 +3967,7 @@ bool FileSprayer::calcUsePull() const { StringBuffer s; sources.item(0).filename.queryIP().getHostText(s); - LOG(MCdebugInfo, job, "Use pull operation because %s doesn't appear to have an ftslave", s.str()); + LOG(MCdebugInfo, "Use pull operation because %s doesn't appear to have an ftslave", s.str()); return true; } @@ -3978,7 +3977,7 @@ bool FileSprayer::calcUsePull() const { StringBuffer s; targets.item(idx).queryIP().getHostText(s); - LOG(MCdebugInfo, job, "Use push operation because %s cannot pull", s.str()); + LOG(MCdebugInfo, "Use push operation because %s cannot pull", s.str()); return false; } } @@ -3987,18 +3986,18 @@ bool FileSprayer::calcUsePull() const { StringBuffer s; targets.item(0).queryIP().getHostText(s); - LOG(MCdebugInfo, job, "Use push operation because %s doesn't appear to have an ftslave", s.str()); + LOG(MCdebugInfo, "Use push operation because %s doesn't appear to have an ftslave", s.str()); return false; } //Use push if going to a single node. if ((targets.ordinality() == 1) && (sources.ordinality() > 1)) { - LOG(MCdebugInfo, job, "Use push operation because going to a single node from many"); + LOG(MCdebugInfo, "Use push operation because going to a single node from many"); return false; } - LOG(MCdebugInfo, job, "Use pull operation as default"); + LOG(MCdebugInfo, "Use pull operation as default"); return true; } diff --git a/dali/ft/filecopy.ipp b/dali/ft/filecopy.ipp index 36d6f24cda5..da8e5c073c4 100644 --- a/dali/ft/filecopy.ipp +++ b/dali/ft/filecopy.ipp @@ -318,7 +318,6 @@ protected: OutputProgressArray progress; IDaftProgress * progressReport; IAbortRequestCallback * abortChecker; - LogMsgJobInfo job; offset_t totalSize; unsigned __int64 sizeToBeRead; bool replicate; diff --git a/dali/ft/ftbase.cpp b/dali/ft/ftbase.cpp index 8417af2f355..47cd917ddb9 100644 --- a/dali/ft/ftbase.cpp +++ b/dali/ft/ftbase.cpp @@ -64,7 +64,7 @@ void renameDfuTempToFinal(const RemoteFilename & realname) EXCLOG(e, "Failed to rename target file"); StringBuffer oldName; realname.getPath(oldName); - LOG(MCdebugInfoDetail, unknownJob, "Error: Rename %s->%s failed - tring to delete target and rename again", oldName.str(), newTailname.str()); + LOG(MCdebugInfoDetail, "Error: Rename %s->%s failed - tring to delete target and rename again", oldName.str(), newTailname.str()); e->Release(); OwnedIFile old = createIFile(realname); old->remove(); @@ -124,7 +124,7 @@ void PartitionPoint::deserialize(MemoryBuffer & in) void PartitionPoint::display() { StringBuffer fulli, fullo; - LOG(MCdebugInfoDetail, unknownJob, + LOG(MCdebugInfoDetail, "Partition %s{%d}[%" I64F "d size %" I64F "d]->%s{%d}[%" I64F "d size %" I64F "d]", inputName.getPath(fulli).str(), whichInput, inputOffset, inputLength, outputName.getPath(fullo).str(), whichOutput, outputOffset, outputLength); @@ -581,7 +581,7 @@ MemoryBuffer & OutputProgress::deserializeExtra(MemoryBuffer & in, unsigned vers static const char * const statusText[] = {"Init","Active","Copied","Renamed"}; void OutputProgress::trace() { - LOG(MCdebugInfoDetail, unknownJob, "Chunk %d status: %s input length: %" I64F "d[CRC:%x] -> output length:%" I64F "d[CRC:%x]", whichPartition, statusText[status], inputLength, inputCRC, outputLength, outputCRC); + LOG(MCdebugInfoDetail, "Chunk %d status: %s input length: %" I64F "d[CRC:%x] -> output length:%" I64F "d[CRC:%x]", whichPartition, statusText[status], inputLength, inputCRC, outputLength, outputCRC); } MemoryBuffer & OutputProgress::serializeCore(MemoryBuffer & out) @@ -666,7 +666,7 @@ void OutputProgress::save(IPropertyTree * tree) void displayProgress(OutputProgressArray & progress) { - LOG(MCdebugInfoDetail, unknownJob, "Progress:"); + LOG(MCdebugInfoDetail, "Progress:"); ForEachItemIn(idx, progress) progress.item(idx).trace(); } @@ -675,7 +675,7 @@ void displayProgress(OutputProgressArray & progress) void displayPartition(PartitionPointArray & partition) { - LOG(MCdebugInfoDetail, unknownJob, "Partition:"); + LOG(MCdebugInfoDetail, "Partition:"); ForEachItemIn(idx, partition) partition.item(idx).display(); } @@ -747,7 +747,7 @@ size32_t CrcIOStream::write(size32_t len, const void * data) static int breakCount; bool daftAbortHandler() { - LOG(MCprogress, unknownJob, "Aborting..."); + LOG(MCprogress, "Aborting..."); // hit ^C 3 times to really stop it... if (breakCount++ >= 2) { diff --git a/dali/ft/ftslavelib.cpp b/dali/ft/ftslavelib.cpp index 6e17857a4f3..7ebf3cbe59b 100644 --- a/dali/ft/ftslavelib.cpp +++ b/dali/ft/ftslavelib.cpp @@ -89,7 +89,7 @@ bool processPartitionCommand(ISocket * masterSocket, MemoryBuffer & msg, MemoryB StringBuffer text; fullPath.getRemotePath(text); - LOG(MCdebugProgress, unknownJob, "Process partition %d(%s)", whichInput, text.str()); + LOG(MCdebugProgress, "Process partition %d(%s)", whichInput, text.str()); Owned processor = createFormatProcessor(srcFormat, tgtFormat, true); Owned target = createOutputProcessor(tgtFormat); processor->setTarget(target); diff --git a/dali/ft/fttransform.cpp b/dali/ft/fttransform.cpp index ee3ab53a3ee..4e8ca2fdec8 100644 --- a/dali/ft/fttransform.cpp +++ b/dali/ft/fttransform.cpp @@ -538,7 +538,7 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input offset_t outputOffset = out->tell(); offset_t inputOffset = input->tell(); if (totalLengthToRead) - LOG(MCdebugProgress, unknownJob, "Progress: %d%% done. [%" I64F "u]", (unsigned)(totalLengthRead*100/totalLengthToRead), (unsigned __int64)totalLengthRead); + LOG(MCdebugProgress, "Progress: %d%% done. [%" I64F "u]", (unsigned)(totalLengthRead*100/totalLengthToRead), (unsigned __int64)totalLengthRead); curProgress.status = (gotLength == 0) ? OutputProgress::StatusCopied : OutputProgress::StatusActive; curProgress.inputLength = input->tell()-startInputOffset; @@ -570,7 +570,7 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input #ifdef _WIN32 if (gpfFrequency && ((fastRand() % gpfFrequency) == 0)) { - LOG(MCdebugInfo, unknownJob, "About to crash...."); + LOG(MCdebugInfo, "About to crash...."); *(char *)0 = 0; } #endif @@ -611,15 +611,15 @@ void TransferServer::deserializeAction(MemoryBuffer & msg, unsigned action) if (action == FTactionpull) { partition.item(0).outputName.getPath(localFilename); - LOG(MCdebugProgress, unknownJob, "Process Pull Command: %s", localFilename.str()); + LOG(MCdebugProgress, "Process Pull Command: %s", localFilename.str()); } else { partition.item(0).inputName.getPath(localFilename); - LOG(MCdebugProgress, unknownJob, "Process Push Command: %s", localFilename.str()); + LOG(MCdebugProgress, "Process Push Command: %s", localFilename.str()); } - LOG(MCdebugProgress, unknownJob, "Num Parallel Slaves=%d Adjust=%d/%d", numParallelSlaves, adjust, updateFrequency); - LOG(MCdebugProgress, unknownJob, "copySourceTimeStamp(%d) mirror(%d) safe(%d) incrc(%d) outcrc(%d)", copySourceTimeStamp, mirror, isSafeMode, calcInputCRC, calcOutputCRC); + LOG(MCdebugProgress, "Num Parallel Slaves=%d Adjust=%d/%d", numParallelSlaves, adjust, updateFrequency); + LOG(MCdebugProgress, "copySourceTimeStamp(%d) mirror(%d) safe(%d) incrc(%d) outcrc(%d)", copySourceTimeStamp, mirror, isSafeMode, calcInputCRC, calcOutputCRC); displayPartition(partition); @@ -658,7 +658,7 @@ void TransferServer::deserializeAction(MemoryBuffer & msg, unsigned action) progress.item(i2).deserializeExtra(msg, 2); } - LOG(MCdebugProgress, unknownJob, "throttle(%d), transferBufferSize(%d)", throttleNicSpeed, transferBufferSize); + LOG(MCdebugProgress, "throttle(%d), transferBufferSize(%d)", throttleNicSpeed, transferBufferSize); PROGLOG("compressedInput(%d), compressedOutput(%d), copyCompressed(%d)", compressedInput?1:0, compressOutput?1:0, copyCompressed?1:0); PROGLOG("encrypt(%d), decrypt(%d)", encryptKey.isEmpty()?0:1, decryptKey.isEmpty()?0:1); if (fileUmask != -1) @@ -691,7 +691,7 @@ void TransferServer::transferChunk(unsigned chunkIndex) StringBuffer targetPath; curPartition.outputName.getPath(targetPath); - LOG(MCdebugProgress, unknownJob, "Begin to transfer chunk %d (offset: %" I64F "d, size: %" I64F "d) to target:'%s' (offset: %" I64F "d, size: %" I64F "d) ", + LOG(MCdebugProgress, "Begin to transfer chunk %d (offset: %" I64F "d, size: %" I64F "d) to target:'%s' (offset: %" I64F "d, size: %" I64F "d) ", chunkIndex, curPartition.inputOffset, curPartition.inputLength, targetPath.str(), curPartition.outputOffset, curPartition.outputLength); const unsigned __int64 startOutOffset = out->tell(); if (startOutOffset != curPartition.outputOffset+curProgress.outputLength) @@ -779,7 +779,7 @@ bool TransferServer::pull() unsigned __int64 progressOffset = curOutputOffset + curProgress.outputLength; if (progressOffset > size) { - LOG(MCwarning, unknownJob, "Recovery information seems to be invalid (%" I64F "d %" I64F "d) start copying from the beginning", + LOG(MCwarning, "Recovery information seems to be invalid (%" I64F "d %" I64F "d) start copying from the beginning", size, progressOffset); //reset any remaining partitions... for (i = start; i < numPartitions; i++) @@ -796,7 +796,7 @@ bool TransferServer::pull() StringBuffer localFilename; localTempFilename.getPath(localFilename); - LOG(MCdebugProgress, unknownJob, "Continue pulling to file: %s from recovery position", localFilename.str()); + LOG(MCdebugProgress, "Continue pulling to file: %s from recovery position", localFilename.str()); start = i; goto processedProgress; // break out of both loops } @@ -835,7 +835,7 @@ bool TransferServer::pull() curOutput = curPartition.whichOutput; if (curProgress.status == OutputProgress::StatusRenamed) { - LOG(MCdebugProgress, unknownJob, "Renamed file found - must be CRC recovery"); + LOG(MCdebugProgress, "Renamed file found - must be CRC recovery"); idx = queryLastOutput(curOutput); continue; } @@ -868,7 +868,7 @@ bool TransferServer::pull() outio.setown(createCompressedFileWriter(outio, false, 0, true, compressor, COMPRESS_METHOD_LZ4)); } - LOG(MCdebugProgress, unknownJob, "Start pulling to file: %s", localFilename.str()); + LOG(MCdebugProgress, "Start pulling to file: %s", localFilename.str()); //Find the last partition entry that refers to the same file. if (!compressOutput && fsProperties.preExtendOutput) @@ -881,7 +881,7 @@ bool TransferServer::pull() stat_type prevWrites = outio->getStatistic(StNumDiskWrites); outio->write(lastOffset-sizeof(null),sizeof(null),&null); curProgress.numWrites += (outio->getStatistic(StNumDiskWrites)-prevWrites); - LOG(MCdebugProgress, unknownJob, "Extend length of target file to %" I64F "d", lastOffset); + LOG(MCdebugProgress, "Extend length of target file to %" I64F "d", lastOffset); } } diff --git a/dali/sasha/sacoalescer.cpp b/dali/sasha/sacoalescer.cpp index 7f22927c80a..ac669ca430b 100644 --- a/dali/sasha/sacoalescer.cpp +++ b/dali/sasha/sacoalescer.cpp @@ -159,7 +159,7 @@ void coalesceDatastore(IPropertyTree *coalesceProps, bool force) } catch (IException *e) { - LOG(MCoperatorError, unknownJob, e, "COALESCER: Unexpected exception, coalesce component halted"); + LOG(MCoperatorError, e, "COALESCER: Unexpected exception, coalesce component halted"); throw; } } diff --git a/dali/sasha/saserver.cpp b/dali/sasha/saserver.cpp index 6d802e4fdef..e44210f7326 100644 --- a/dali/sasha/saserver.cpp +++ b/dali/sasha/saserver.cpp @@ -84,7 +84,7 @@ static void stopServer() ForEachItemInRev(i,servers) { ISashaServer &server=servers.item(i); - LOG(MCprogress, unknownJob, "Stopping %d",i); + LOG(MCprogress, "Stopping %d",i); server.stop(); } ForEachItemInRev(j,servers) @@ -96,10 +96,10 @@ static void stopServer() static bool actionOnAbort() { - LOG(MCprogress, unknownJob, "Stop signalled"); + LOG(MCprogress, "Stop signalled"); if (stopped) { - LOG(MCprogress, unknownJob, "Previously marked stopped. Killing process.."); + LOG(MCprogress, "Previously marked stopped. Killing process.."); queryLogMsgManager()->flushQueue(10*1000); #ifdef _WIN32 TerminateProcess(GetCurrentProcess(), 1); @@ -118,8 +118,8 @@ static bool actionOnAbort() void requestStop(IException *e) { if (e) - LOG(MCoperatorError, unknownJob, e, "SASERVER: Unexpected exception, saserver terminating"); - LOG(MCprogress, unknownJob, "Stop requested"); + LOG(MCoperatorError, e, "SASERVER: Unexpected exception, saserver terminating"); + LOG(MCprogress, "Stop requested"); stopSem.signal(); } diff --git a/dali/sasha/saverify.cpp b/dali/sasha/saverify.cpp index aec54d09e2c..5f558ce44ac 100644 --- a/dali/sasha/saverify.cpp +++ b/dali/sasha/saverify.cpp @@ -543,9 +543,9 @@ class CSashaDaFSMonitorServer: public ISashaServer, public Thread ep.getEndpointHostText(epstr); CriticalBlock block(sect); if (failurelimit) { - LOG(MCoperatorError, unknownJob,"DAFSMON: dafilesrv on %s cannot be contacted",epstr.str()); + LOG(MCoperatorError, "DAFSMON: dafilesrv on %s cannot be contacted",epstr.str()); if (--failurelimit==0) - LOG(MCoperatorError, unknownJob,"DAFSMON: monitoring suspended for cluster %s (too many failures)",clustername); + LOG(MCoperatorError, "DAFSMON: monitoring suspended for cluster %s (too many failures)",clustername); } } } @@ -557,7 +557,7 @@ class CSashaDaFSMonitorServer: public ISashaServer, public Thread ep.getEndpointHostText(epstr); StringBuffer s; s.appendf("DAFSMON: dafilesrv %s",epstr.str()); - LOG(MCoperatorError, unknownJob, e, s.str()); + LOG(MCoperatorError, e, s.str()); e->Release(); return; } diff --git a/dali/server/daserver.cpp b/dali/server/daserver.cpp index d02451e3ca6..3e4aac3c583 100644 --- a/dali/server/daserver.cpp +++ b/dali/server/daserver.cpp @@ -95,13 +95,13 @@ static void stopServer() ForEachItemInRev(h,servers) { IDaliServer &server=servers.item(h); - LOG(MCprogress, unknownJob, "Suspending %d",h); + LOG(MCprogress, "Suspending %d",h); server.suspend(); } ForEachItemInRev(i,servers) { IDaliServer &server=servers.item(i); - LOG(MCprogress, unknownJob, "Stopping %d",i); + LOG(MCprogress, "Stopping %d",i); server.stop(); } closeCoven(); @@ -649,7 +649,7 @@ int main(int argc, const char* argv[]) catch (IException *e) { StringBuffer s("Failure whilst preparing dali backup location: "); - LOG(MCoperatorError, unknownJob, e, s.append(mirrorPath).append(". Backup disabled").str()); + LOG(MCoperatorError, e, s.append(mirrorPath).append(". Backup disabled").str()); serverConfig->removeProp("SDS/@remoteBackupLocation"); e->Release(); } diff --git a/ecl/eclagent/eclagent.cpp b/ecl/eclagent/eclagent.cpp index a3a56824808..c9ff22c6bd2 100644 --- a/ecl/eclagent/eclagent.cpp +++ b/ecl/eclagent/eclagent.cpp @@ -127,7 +127,7 @@ static const char * getResultText(StringBuffer & s, const char * stepname, unsig void logGetResult(const char * name, const char * stepname, unsigned sequence) { - LOG(MCgetresult, unknownJob, "getResult%s(%s,%d)", name, nullText(stepname), sequence); + LOG(MCgetresult, "getResult%s(%s,%d)", name, nullText(stepname), sequence); } //======================================================================================= @@ -724,7 +724,7 @@ IConstWUResult *EclAgent::getResultForGet(const char *name, unsigned sequence) IConstWUResult *EclAgent::getExternalResult(const char * wuid, const char *name, unsigned sequence) { - LOG(MCsetresult, unknownJob, "EclAgent::getExternalResult(wuid:'%s',name='%s',sequence:%d)", nullText(wuid), nullText(name), sequence); + LOG(MCsetresult, "EclAgent::getExternalResult(wuid:'%s',name='%s',sequence:%d)", nullText(wuid), nullText(name), sequence); Owned factory = getWorkUnitFactory(); Owned externalWU = factory->openWorkUnit(wuid); if (externalWU) @@ -773,7 +773,7 @@ void EclAgent::outputFormattedResult(const char * name, unsigned sequence, bool void EclAgent::setResultInt(const char * name, unsigned sequence, __int64 val, unsigned size) { - LOG(MCsetresult, unknownJob, "setResultInt(%s,%d,%" I64F "d)", nullText(name), sequence, val); + LOG(MCsetresult, "setResultInt(%s,%d,%" I64F "d)", nullText(name), sequence, val); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -797,7 +797,7 @@ void EclAgent::setResultInt(const char * name, unsigned sequence, __int64 val, u void EclAgent::setResultUInt(const char * name, unsigned sequence, unsigned __int64 val, unsigned size) { - LOG(MCsetresult, unknownJob, "setResultUInt(%s,%d,%" I64F "u)", nullText(name), sequence, val); + LOG(MCsetresult, "setResultUInt(%s,%d,%" I64F "u)", nullText(name), sequence, val); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -822,7 +822,7 @@ void EclAgent::setResultUInt(const char * name, unsigned sequence, unsigned __in void EclAgent::setResultReal(const char *name, unsigned sequence, double val) { // Still a bit of a mess - variables vs results - LOG(MCsetresult, unknownJob, "setResultReal(%s,%d,%6f)", nullText(name), sequence, val); + LOG(MCsetresult, "setResultReal(%s,%d,%6f)", nullText(name), sequence, val); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -1122,7 +1122,7 @@ void EclAgent::setResultData(const char * stepname, unsigned sequence, int len, void EclAgent::doSetResultString(type_t type, const char *name, unsigned sequence, int len, const char *val) { - LOG(MCsetresult, unknownJob, "setResultString(%s,%d,(%d bytes))", nullText(name), sequence, len); + LOG(MCsetresult, "setResultString(%s,%d,(%d bytes))", nullText(name), sequence, len); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -1147,7 +1147,7 @@ void EclAgent::doSetResultString(type_t type, const char *name, unsigned sequenc //used to output a row void EclAgent::setResultRaw(const char * name, unsigned sequence, int len, const void *val) { - LOG(MCsetresult, unknownJob, "setResultRaw(%s,%d,(%d bytes))", nullText(name), sequence, len); + LOG(MCsetresult, "setResultRaw(%s,%d,(%d bytes))", nullText(name), sequence, len); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -1171,7 +1171,7 @@ void EclAgent::setResultRaw(const char * name, unsigned sequence, int len, const void EclAgent::setResultSet(const char * name, unsigned sequence, bool isAll, size32_t len, const void *val, ISetToXmlTransformer *xform) { - LOG(MCsetresult, unknownJob, "setResultSet(%s,%d)", nullText(name), sequence); + LOG(MCsetresult, "setResultSet(%s,%d)", nullText(name), sequence); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -1231,7 +1231,7 @@ void EclAgent::setResultSet(const char * name, unsigned sequence, bool isAll, si void EclAgent::setResultUnicode(const char * name, unsigned sequence, int len, UChar const * val) { - LOG(MCsetresult, unknownJob, "setResultUnicode(%s,%d)", nullText(name), sequence); + LOG(MCsetresult, "setResultUnicode(%s,%d)", nullText(name), sequence); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); @@ -1259,7 +1259,7 @@ void EclAgent::setResultUnicode(const char * name, unsigned sequence, int len, U void EclAgent::setResultBool(const char *name, unsigned sequence, bool val) { - LOG(MCsetresult, unknownJob, "setResultBool(%s,%d,%s)", nullText(name), sequence, val ? "true" : "false"); + LOG(MCsetresult, "setResultBool(%s,%d,%s)", nullText(name), sequence, val ? "true" : "false"); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); @@ -1284,7 +1284,7 @@ void EclAgent::setResultBool(const char *name, unsigned sequence, bool val) void EclAgent::setResultDecimal(const char *name, unsigned sequence, int len, int precision, bool isSigned, const void *val) { - LOG(MCsetresult, unknownJob, "setResultDecimal(%s,%d)", nullText(name), sequence); + LOG(MCsetresult, "setResultDecimal(%s,%d)", nullText(name), sequence); WorkunitUpdate w = updateWorkUnit(); Owned r = updateWorkUnitResult(w, name, sequence); if (r) @@ -1313,7 +1313,7 @@ void EclAgent::setResultDecimal(const char *name, unsigned sequence, int len, in void EclAgent::setResultDataset(const char * name, unsigned sequence, size32_t len, const void *val, unsigned numRows, bool extend) { - LOG(MCsetresult, unknownJob, "setResultDataset(%s,%d)", nullText(name), sequence); + LOG(MCsetresult, "setResultDataset(%s,%d)", nullText(name), sequence); WorkunitUpdate w = updateWorkUnit(); Owned result = updateWorkUnitResult(w, name, sequence); if (!result) @@ -1865,11 +1865,11 @@ void EclAgent::doProcess() CCycleTimer elapsedTimer; try { - LOG(MCrunlock, unknownJob, "Waiting for workunit lock"); + LOG(MCrunlock, "Waiting for workunit lock"); unsigned eclccCodeVersion; { WorkunitUpdate w = updateWorkUnit(); - LOG(MCrunlock, unknownJob, "Obtained workunit lock"); + LOG(MCrunlock, "Obtained workunit lock"); if (w->hasDebugValue("traceLevel")) traceLevel = w->getDebugValueInt("traceLevel", 10); w->setTracingValue("EclAgentBuild", hpccBuildInfo.buildTag); @@ -2263,9 +2263,9 @@ void EclAgent::runProcess(IEclProcess *process) debugContext->checkBreakpoint(DebugStateFinished, NULL, NULL); debugContext->debugTerminate(); } - LOG(MCrunlock, unknownJob, "Releasing persist read locks"); + LOG(MCrunlock, "Releasing persist read locks"); persistReadLocks.kill(); - LOG(MCrunlock, unknownJob, "Released persist read locks"); + LOG(MCrunlock, "Released persist read locks"); } unsigned EclAgent::getWorkflowId() @@ -2298,7 +2298,7 @@ IRemoteConnection *EclAgentWorkflowMachine::startPersist(const char * logicalNam { persistLock = persistCache.getValue(logicalName); persistCache.setValue(logicalName, NULL); - LOG(MCrunlock, unknownJob, "Decached persist read lock for %s", logicalName); + LOG(MCrunlock, "Decached persist read lock for %s", logicalName); } else persistLock = agent.startPersist(logicalName); @@ -2380,7 +2380,7 @@ void EclAgentWorkflowMachine::prelockPersists() char const * name = names.item(idx); Owned persistLock = agent.startPersist(name); persistCache.setValue(name, persistLock); - LOG(MCrunlock, unknownJob, "Cached persist read lock for %s", name); + LOG(MCrunlock, "Cached persist read lock for %s", name); } persistsPrelocked = true; } @@ -2421,16 +2421,16 @@ void EclAgentWorkflowMachine::obtainRunlock() { StringBuffer xpath; xpath.append("/WorkUnitRunLocks/").append(agent.wuid.get()); - LOG(MCrunlock, unknownJob, "Waiting for run lock"); + LOG(MCrunlock, "Waiting for run lock"); runlock.setown(querySDS().connect(xpath.str(), myProcessSession(), RTM_CREATE | RTM_LOCK_WRITE | RTM_DELETE_ON_DISCONNECT, INFINITE)); - LOG(MCrunlock, unknownJob, "Obtained run lock"); + LOG(MCrunlock, "Obtained run lock"); if(!runlock) agent.fail(0, "EclAgent could not get a lock to run the workunit"); } void EclAgentWorkflowMachine::releaseRunlock() { - LOG(MCrunlock, unknownJob, "Releasing run lock"); + LOG(MCrunlock, "Releasing run lock"); if(runlock && queryDaliServerVersion().compare("1.3") < 0) runlock->close(true); runlock.clear(); @@ -2445,7 +2445,7 @@ IRemoteConnection *EclAgentWorkflowMachine::obtainCriticalLock(const char *name) void EclAgentWorkflowMachine::releaseCriticalLock(IRemoteConnection *criticalLock) { - LOG(MCrunlock, unknownJob, "Releasing critical lock"); + LOG(MCrunlock, "Releasing critical lock"); if(criticalLock && queryDaliServerVersion().compare("1.3") < 0) criticalLock->close(true); } @@ -2547,7 +2547,7 @@ void EclAgentWorkflowMachine::doExecutePersistItem(IRuntimeWorkflowItem & item) { persistLock.set(persistCache.getValue(logicalName)); persistCache.setValue(logicalName, NULL); - LOG(MCrunlock, unknownJob, "Decached persist read lock for %s", logicalName); + LOG(MCrunlock, "Decached persist read lock for %s", logicalName); } else persistLock.setown(agent.startPersist(logicalName)); @@ -2805,7 +2805,7 @@ bool EclAgent::checkPersistUptoDate(IRuntimeWorkflowItem & item, const char * lo bool EclAgent::changePersistLockMode(IRemoteConnection *persistLock, unsigned mode, const char * name, bool repeat) { - LOG(MCrunlock, unknownJob, "Waiting to change persist lock to %s for %s", (mode == RTM_LOCK_WRITE) ? "write" : "read", name); + LOG(MCrunlock, "Waiting to change persist lock to %s for %s", (mode == RTM_LOCK_WRITE) ? "write" : "read", name); //When converting a read lock to a write lock so the persist can be rebuilt hold onto the lock as short as //possible. Otherwise lots of workunits each trying to convert read locks to write locks will mean //that the read lock is never released by all the workunits at the same time, so no workunit can progress. @@ -2851,7 +2851,7 @@ IRemoteConnection *EclAgent::getPersistReadLock(const char * logicalName) for (const char * cur = name;*cur;cur++) xpath.append(isalnum(*cur) ? *cur : '_'); - LOG(MCrunlock, unknownJob, "Waiting for persist read lock for %s", name); + LOG(MCrunlock, "Waiting for persist read lock for %s", name); Owned persistLock; for (;;) { @@ -2973,7 +2973,7 @@ bool EclAgent::alreadyLockedPersist(const char * persistName) void EclAgent::finishPersist(const char * persistName, IRemoteConnection *persistLock) { - LOG(MCrunlock, unknownJob, "Finished persists - add to read lock list"); + LOG(MCrunlock, "Finished persists - add to read lock list"); processedPersists.append(persistName); persistReadLocks.append(*persistLock); } @@ -3290,7 +3290,7 @@ void EclAgent::reportProgress(const char *progress, unsigned flags) if (progress) { // MORE - think about how to best do this - LOG(MCdebugProgress, unknownJob,"%s", progress); + LOG(MCdebugProgress, "%s", progress); // WorkunitUpdate wu = updateWorkUnit(); // wu->reportProgress(progress, flags); } diff --git a/ecl/eclcc/eclcc.cpp b/ecl/eclcc/eclcc.cpp index 878b574c332..f3f26dba715 100644 --- a/ecl/eclcc/eclcc.cpp +++ b/ecl/eclcc/eclcc.cpp @@ -1022,7 +1022,7 @@ void EclCC::instantECL(EclCompileInstance & instance, IWorkUnit *wu, const char void EclCC::getComplexity(IWorkUnit *wu, IHqlExpression * query, IErrorReceiver & errs) { double complexity = getECLcomplexity(query, &errs, wu, optTargetClusterType); - LOG(MCoperatorProgress, unknownJob, "Complexity = %g", complexity); + LOG(MCoperatorProgress, "Complexity = %g", complexity); } //========================================================================================= @@ -2308,7 +2308,7 @@ void EclCC::traceError(char const * format, ...) UERRLOG("", encoded.str()); } else - VALOG(MCuserError, unknownJob, format, args); + VALOG(MCuserError, format, args); va_end(args); } diff --git a/ecl/hql/hqlexpr.cpp b/ecl/hql/hqlexpr.cpp index 57529bce0ae..4c3ce419227 100644 --- a/ecl/hql/hqlexpr.cpp +++ b/ecl/hql/hqlexpr.cpp @@ -15467,7 +15467,7 @@ extern HQL_API IHqlExpression * getFileViewerRecord(IHqlExpression * record, boo } catch (IException * e) { - LOG(MCwarning, unknownJob, e); + LOG(MCwarning, e); e->Release(); } return NULL; diff --git a/ecl/hqlcpp/hqlhtcpp.cpp b/ecl/hqlcpp/hqlhtcpp.cpp index f2939a87576..a50c090e564 100644 --- a/ecl/hqlcpp/hqlhtcpp.cpp +++ b/ecl/hqlcpp/hqlhtcpp.cpp @@ -19562,11 +19562,11 @@ static void logECL(const LogMsgCategory & category, size32_t len, const char * e unsigned size = next-ecl; if (ecl[size-1] == '\r') size--; - LOG(category, unknownJob, "%.*s", size, ecl); + LOG(category, "%.*s", size, ecl); len -= (next+1-ecl); ecl = next+1; } - LOG(category, unknownJob, "%s", ecl); + LOG(category, "%s", ecl); } @@ -19580,7 +19580,7 @@ void HqlCppTranslator::traceExpression(const char * title, IHqlExpression * expr if (!queryTrace(title)) return; - LOG(MCdebugInfo, unknownJob, "Tracing expressions: %s", title); + LOG(MCdebugInfo, "Tracing expressions: %s", title); if (options.traceIR) { EclIR::dbglogIR(expr); @@ -19607,7 +19607,7 @@ void HqlCppTranslator::traceExpressions(const char * title, WorkflowArray & work if (!queryTrace(title)) return; - LOG(MCdebugInfo, unknownJob, "Tracing expressions: %s", title); + LOG(MCdebugInfo, "Tracing expressions: %s", title); ForEachItemIn(idx1, workflow) { WorkflowItem & cur = workflow.item(idx1); @@ -19615,7 +19615,7 @@ void HqlCppTranslator::traceExpressions(const char * title, WorkflowArray & work if (compound) { - LOG(MCdebugInfo, unknownJob, "%s: #%d: id[%d]", title, idx1, cur.queryWfid()); + LOG(MCdebugInfo, "%s: #%d: id[%d]", title, idx1, cur.queryWfid()); if (options.traceIR) { diff --git a/ecl/hthor/hthorkey.cpp b/ecl/hthor/hthorkey.cpp index da82a9ef7cf..beb71d84a4e 100644 --- a/ecl/hthor/hthorkey.cpp +++ b/ecl/hthor/hthorkey.cpp @@ -681,7 +681,7 @@ const IDynamicTransform * CHThorIndexReadActivityBase::getLayoutTranslator(IDist //MORE: We could introduce a more efficient way of checking this that does not create a translator Owned actualTranslator = createRecordTranslator(expectedFormat->queryRecordAccessor(true), actualFormat->queryRecordAccessor(true)); - DBGLOG("Record layout translator created for %s", f->queryLogicalName()); + DBGLOG("Record layout translator created for %s", f->queryLogicalName()); actualTranslator->describe(); if (actualTranslator->keyedTranslated()) throw MakeStringException(0, "Untranslatable key layout mismatch reading index %s - keyed fields do not match", f->queryLogicalName()); @@ -2458,7 +2458,7 @@ class CHThorFlatFetchActivity : public CHThorFetchActivityBase, public IFlatFetc if (actualDiskMeta) { translator.setown(createRecordTranslator(helper.queryProjectedDiskRecordSize()->queryRecordAccessor(true), actualDiskMeta->queryRecordAccessor(true))); - DBGLOG("Record layout translator created for %s", f->queryLogicalName()); + DBGLOG("Record layout translator created for %s", f->queryLogicalName()); translator->describe(); if (translator->canTranslate()) { diff --git a/ecl/wutest/wujobqtest.cpp b/ecl/wutest/wujobqtest.cpp index 276f8d0f07f..40f2e679f5b 100644 --- a/ecl/wutest/wujobqtest.cpp +++ b/ecl/wutest/wujobqtest.cpp @@ -155,11 +155,11 @@ void testEnqueue(unsigned nthreads,const char *qname) { unsigned start = msTick(); if (!partfile->remove()&&(copy==0)) // only warn about missing primary files - LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); + LOG(MCwarning, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); else { unsigned t = msTick()-start; if (t>5*1000) - LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); + LOG(MCwarning, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); } } diff --git a/esp/bindings/SOAP/Platform/soapservice.cpp b/esp/bindings/SOAP/Platform/soapservice.cpp index cee7fda5e52..4a58cd3c51e 100644 --- a/esp/bindings/SOAP/Platform/soapservice.cpp +++ b/esp/bindings/SOAP/Platform/soapservice.cpp @@ -195,7 +195,7 @@ int CSoapService::processRequest(ISoapMessage &req, ISoapMessage& resp) rpc_call->preunmarshall(xpp.get()); rpc_call->unmarshall(xpp.get(), multipart.get()); const char* userId = ctx->queryUserId(); - DBGLOG("JSON method <%s> from %s@%s.", rpc_call->get_name(), (userId&&*userId)?userId:"unknown", + DBGLOG("JSON method <%s> from %s@%s.", rpc_call->get_name(), (userId&&*userId)?userId:"unknown", (peerStr.length()>0)?peerStr.str():"unknown"); ctx->setHTTPMethod("JSON"); } @@ -243,12 +243,12 @@ int CSoapService::processRequest(ISoapMessage &req, ISoapMessage& resp) } catch (...) { response.set_status(SOAP_CLIENT_ERROR); response.set_err("Unknown error when parsing soap body XML"); - IERRLOG("SOAP request from %s@%s. Unknown error when parsing: %s", (userId&&*userId)?userId:"unknown", + IERRLOG("SOAP request from %s@%s. Unknown error when parsing: %s", (userId&&*userId)?userId:"unknown", (peerStr.length()>0)?peerStr.str():"unknown", requeststr.str()); return 0; } - DBGLOG("SOAP method <%s> from %s@%s.", rpc_call->get_name(), (userId&&*userId)?userId:"unknown", + DBGLOG("SOAP method <%s> from %s@%s.", rpc_call->get_name(), (userId&&*userId)?userId:"unknown", (peerStr.length()>0)?peerStr.str():"unknown"); ctx->setHTTPMethod("SOAP"); } diff --git a/esp/esdllib/esdl_def.cpp b/esp/esdllib/esdl_def.cpp index dce6db127f8..62ee2797892 100644 --- a/esp/esdllib/esdl_def.cpp +++ b/esp/esdllib/esdl_def.cpp @@ -1669,7 +1669,7 @@ unsigned EsdlDefinition::walkChildrenDepthFirst( AddedObjs& foundByName, EsdlDef children->next(); } } //else { DBGLOG("%s<%s> no Children", StringBuffer(level*2, " ").str(), esdlObj->queryName()); } - } //else { DBGLOG("%s<%s> is not Struct", StringBuffer(level*2, " ").str(), esdlObj->queryName()); } + } //else { DBGLOG("%s<%s> is not Struct", StringBuffer(level*2, " ").str(), esdlObj->queryName()); } return stateOut; } diff --git a/esp/platform/espcfg.cpp b/esp/platform/espcfg.cpp index 21a0fb87422..171d205592e 100644 --- a/esp/platform/espcfg.cpp +++ b/esp/platform/espcfg.cpp @@ -689,7 +689,7 @@ void CEspConfig::loadBinding(binding_cfg &xcfg) { IEspRpcBinding* bind = xproc(xcfg.name.str(), xcfg.type.str(), m_envpt.get(), m_process.str()); if (bind) - LOG(MCoperatorInfo, unknownJob,"Load binding %s (type: %s, process: %s) succeeded", xcfg.name.str(), xcfg.type.str(), m_process.str()); + LOG(MCoperatorInfo, "Load binding %s (type: %s, process: %s) succeeded", xcfg.name.str(), xcfg.type.str(), m_process.str()); else OERRLOG("Failed to load binding %s (type: %s, process: %s)", xcfg.name.str(), xcfg.type.str(), m_process.str()); xcfg.bind.setown(bind); diff --git a/esp/platform/espcontext.cpp b/esp/platform/espcontext.cpp index a2bca7b701f..214f0a761da 100755 --- a/esp/platform/espcontext.cpp +++ b/esp/platform/espcontext.cpp @@ -1029,7 +1029,7 @@ void ESPLOG(LogLevel level, const char* fmt, ...) { va_list args; va_start(args,fmt); - VALOG(MCdebugInfo, unknownJob, fmt, args); + VALOG(MCdebugInfo, fmt, args); va_end(args); } } @@ -1040,7 +1040,7 @@ void ESPLOG(IEspContext* ctx, LogLevel level, const char* fmt, ...) { va_list args; va_start(args,fmt); - VALOG(MCdebugInfo, unknownJob, fmt, args); + VALOG(MCdebugInfo, fmt, args); va_end(args); } } diff --git a/esp/platform/espp.hpp b/esp/platform/espp.hpp index ffc3682b455..c7768c24ad9 100644 --- a/esp/platform/espp.hpp +++ b/esp/platform/espp.hpp @@ -186,7 +186,7 @@ class CEspServer : public CInterface, { va_list args; va_start(args, fmt); - VALOG(MCdebugInfo, unknownJob, fmt, args); + VALOG(MCdebugInfo, fmt, args); va_end(args); } } diff --git a/esp/services/ws_fileio/ws_fileioservice.cpp b/esp/services/ws_fileio/ws_fileioservice.cpp index 304adaa908d..00335be3c88 100644 --- a/esp/services/ws_fileio/ws_fileioservice.cpp +++ b/esp/services/ws_fileio/ws_fileioservice.cpp @@ -159,13 +159,13 @@ bool CWsFileIOEx::onReadFileData(IEspContext &context, IEspReadFileDataRequest & if (io->read(offset, (int)dataToRead, buf) != dataToRead) { resp.setResult("ReadFileData error."); - LOG(MCprogress, unknownJob, "ReadFileData error: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); + LOG(MCprogress, "ReadFileData error: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); } else { resp.setData(membuf); resp.setResult("ReadFileData done."); - LOG(MCprogress, unknownJob, "ReadFileData done: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); + LOG(MCprogress, "ReadFileData done: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); } return true; @@ -237,12 +237,12 @@ bool CWsFileIOEx::onWriteFileData(IEspContext &context, IEspWriteFileDataRequest if (fileio->write(offset, len, srcdata.readDirect(len)) != len) { resp.setResult("WriteFileData error."); - LOG(MCprogress, unknownJob, "WriteFileData error: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); + LOG(MCprogress, "WriteFileData error: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); } else { resp.setResult("WriteFileData done."); - LOG(MCprogress, unknownJob, "WriteFileData done: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); + LOG(MCprogress, "WriteFileData done: %s: %s %s", context.getUserID(user).str(), server, destRelativePath); } return true; diff --git a/esp/services/ws_fs/ws_fsService.cpp b/esp/services/ws_fs/ws_fsService.cpp index 884145e2419..79384d417a9 100644 --- a/esp/services/ws_fs/ws_fsService.cpp +++ b/esp/services/ws_fs/ws_fsService.cpp @@ -1903,7 +1903,7 @@ IPropertyTree *CFileSprayEx::getAndValidateDropZone(const char *path, const char if (env->isDropZoneRestrictionEnabled()) throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "DropZone Plane not found for host %s path %s.", host, path); - LOG(MCdebugInfo, unknownJob, "No matching drop zone path on '%s' to file path: '%s'", host, path); + LOG(MCdebugInfo, "No matching drop zone path on '%s' to file path: '%s'", host, path); #endif return nullptr; } diff --git a/esp/services/ws_workunits/ws_workunitsHelpers.cpp b/esp/services/ws_workunits/ws_workunitsHelpers.cpp index bb6fd445832..7734088e0fb 100644 --- a/esp/services/ws_workunits/ws_workunitsHelpers.cpp +++ b/esp/services/ws_workunits/ws_workunitsHelpers.cpp @@ -467,7 +467,7 @@ unsigned WsWuInfo::sendComponentLogContent(IEspContext* context, IRemoteLogAcces if (abortCallback.abortRequested()) { - LOG(MCdebugInfo, unknownJob, "WsWuInfo::sendComponentLogContent(): abort requested via callback"); + LOG(MCdebugInfo, "WsWuInfo::sendComponentLogContent(): abort requested via callback"); break; } } diff --git a/esp/smc/SMCLib/LogicFileWrapper.hpp b/esp/smc/SMCLib/LogicFileWrapper.hpp index 032ae8f969d..3fc70350911 100644 --- a/esp/smc/SMCLib/LogicFileWrapper.hpp +++ b/esp/smc/SMCLib/LogicFileWrapper.hpp @@ -95,7 +95,7 @@ struct DeleteTask: public CInterface, implements ITask { StringBuffer e; e.appendf("Failed to remove file part %s\n",file->queryFilename()); - LOG(MCerror, unknownJob, "%s", e.str()); + LOG(MCerror, "%s", e.str()); errs.append(e); } } diff --git a/esp/smc/SMCLib/TpCommon.cpp b/esp/smc/SMCLib/TpCommon.cpp index 241401930d6..5863c70c275 100644 --- a/esp/smc/SMCLib/TpCommon.cpp +++ b/esp/smc/SMCLib/TpCommon.cpp @@ -131,7 +131,7 @@ extern TPWRAPPER_API void throwOrLogDropZoneLookUpError(int code, char const* fo if (env->isDropZoneRestrictionEnabled()) throw makeStringExceptionVA(code, format, args); - VALOG(MCdebugInfo, unknownJob, format, args); + VALOG(MCdebugInfo, format, args); #endif va_end(args); } diff --git a/fs/dafsserver/dafsserver.cpp b/fs/dafsserver/dafsserver.cpp index 5cb9a26b118..0cc9fd72572 100644 --- a/fs/dafsserver/dafsserver.cpp +++ b/fs/dafsserver/dafsserver.cpp @@ -3878,7 +3878,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface file->setShareMode((IFSHmode)sMode); } if (TF_TRACE_PRE_IO) - PROGLOG("before open file '%s', (%d,%d,%d,%d,0%o)",name->text.get(),(int)mode,(int)share,extraFlags,sMode,cFlags); + PROGLOG("before open file '%s', (%d,%d,%d,%d,0%o)",name->text.get(),(int)mode,(int)share,extraFlags,sMode,cFlags); Owned fileio; #ifndef _WIN32 @@ -3940,9 +3940,9 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface if (TF_TRACE) { #ifndef _WIN32 - PROGLOG("open file '%s', (%d,%d) handle = %d",name->text.get(),(int)mode,(int)share,handle); + PROGLOG("open file '%s', (%d,%d) handle = %d",name->text.get(),(int)mode,(int)share,handle); #else - PROGLOG("open file '%s', (%d,%d) handle = %d, retries = %u, time(ms) = %u",name->text.get(),(int)mode,(int)share,handle,retries,timer.elapsedMs()); + PROGLOG("open file '%s', (%d,%d) handle = %d, retries = %u, time(ms) = %u",name->text.get(),(int)mode,(int)share,handle,retries,timer.elapsedMs()); #endif } return true; @@ -3955,7 +3955,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface IFileIO *fileio; checkFileIOHandle(reply, handle, fileio, true); if (TF_TRACE) - PROGLOG("close file, handle = %d",handle); + PROGLOG("close file, handle = %d",handle); reply.append(RFEnoerror); return true; } @@ -3975,13 +3975,13 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface size32_t numRead; unsigned posOfLength = reply.length(); if (TF_TRACE_PRE_IO) - PROGLOG("before read file, handle = %d, toread = %d",handle,len); + PROGLOG("before read file, handle = %d, toread = %d",handle,len); reply.reserve(sizeof(numRead)); void *data = reply.reserve(len); numRead = fileio->read(pos,len,data); stats.addRead(len); if (TF_TRACE) - PROGLOG("read file, handle = %d, pos = %" I64F "d, toread = %d, read = %d",handle,pos,len,numRead); + PROGLOG("read file, handle = %d, pos = %" I64F "d, toread = %d, read = %d",handle,pos,len,numRead); reply.setLength(posOfLength + sizeof(numRead) + numRead); reply.writeEndianDirect(posOfLength,sizeof(numRead),&numRead); } @@ -3995,7 +3995,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface __int64 size = fileio->size(); reply.append((unsigned)RFEnoerror).append(size); if (TF_TRACE) - PROGLOG("size file, handle = %d, size = %" I64F "d",handle,size); + PROGLOG("size file, handle = %d, size = %" I64F "d",handle,size); } void cmdSetSize(MemoryBuffer & msg, MemoryBuffer & reply) @@ -4005,7 +4005,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface msg.read(handle).read(size); IFileIO *fileio; if (TF_TRACE) - PROGLOG("set size file, handle = %d, size = %" I64F "d",handle,size); + PROGLOG("set size file, handle = %d, size = %" I64F "d",handle,size); checkFileIOHandle(reply, handle, fileio); fileio->setSize(size); reply.append((unsigned)RFEnoerror); @@ -4021,11 +4021,11 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface checkFileIOHandle(reply, handle, fileio); const byte *data = (const byte *)msg.readDirect(len); if (TF_TRACE_PRE_IO) - PROGLOG("before write file, handle = %d, towrite = %d",handle,len); + PROGLOG("before write file, handle = %d, towrite = %d",handle,len); size32_t numWritten = fileio->write(pos,len,data); stats.addWrite(numWritten); if (TF_TRACE) - PROGLOG("write file, handle = %d, towrite = %d, written = %d",handle,len,numWritten); + PROGLOG("write file, handle = %d, towrite = %d, written = %d",handle,len,numWritten); reply.append((unsigned)RFEnoerror).append(numWritten); } @@ -4034,7 +4034,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("exists, '%s'",name.get()); + PROGLOG("exists, '%s'",name.get()); Owned file=createIFile(name); bool e = file->exists(); reply.append((unsigned)RFEnoerror).append(e); @@ -4045,7 +4045,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("remove, '%s'",name.get()); + PROGLOG("remove, '%s'",name.get()); Owned file=createIFile(name); bool e = file->remove(); reply.append((unsigned)RFEnoerror).append(e); @@ -4074,7 +4074,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr toname; msg.read(toname); if (TF_TRACE) - PROGLOG("rename, '%s' to '%s'",fromname.get(),toname.get()); + PROGLOG("rename, '%s' to '%s'",fromname.get(),toname.get()); Owned file=createIFile(fromname); file->rename(toname); reply.append((unsigned)RFEnoerror); @@ -4087,7 +4087,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr toname; msg.read(toname); if (TF_TRACE) - PROGLOG("move, '%s' to '%s'",fromname.get(),toname.get()); + PROGLOG("move, '%s' to '%s'",fromname.get(),toname.get()); Owned file=createIFile(fromname); file->move(toname); reply.append((unsigned)RFEnoerror); @@ -4100,7 +4100,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr toname; msg.read(toname); if (TF_TRACE) - PROGLOG("copy, '%s' to '%s'",fromname.get(),toname.get()); + PROGLOG("copy, '%s' to '%s'",fromname.get(),toname.get()); copyFile(toname, fromname); reply.append((unsigned)RFEnoerror); } @@ -4119,7 +4119,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface __int64 written = fileio->appendFile(file,pos,len); stats.addWrite(written); if (TF_TRACE) - PROGLOG("append file, handle = %d, file=%s, pos = %" I64F "d len = %" I64F "d written = %" I64F "d",handle,srcname.get(),pos,len,written); + PROGLOG("append file, handle = %d, file=%s, pos = %" I64F "d len = %" I64F "d written = %" I64F "d",handle,srcname.get(),pos,len,written); reply.append((unsigned)RFEnoerror).append(written); } @@ -4128,7 +4128,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("isFile, '%s'",name.get()); + PROGLOG("isFile, '%s'",name.get()); Owned file=createIFile(name); unsigned ret = (unsigned)file->isFile(); reply.append((unsigned)RFEnoerror).append(ret); @@ -4139,7 +4139,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("isDir, '%s'",name.get()); + PROGLOG("isDir, '%s'",name.get()); Owned file=createIFile(name); unsigned ret = (unsigned)file->isDirectory(); reply.append((unsigned)RFEnoerror).append(ret); @@ -4150,7 +4150,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("isReadOnly, '%s'",name.get()); + PROGLOG("isReadOnly, '%s'",name.get()); Owned file=createIFile(name); unsigned ret = (unsigned)file->isReadOnly(); reply.append((unsigned)RFEnoerror).append(ret); @@ -4163,7 +4163,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface msg.read(name).read(set); if (TF_TRACE) - PROGLOG("setReadOnly, '%s' %d",name.get(),(int)set); + PROGLOG("setReadOnly, '%s' %d",name.get(),(int)set); Owned file=createIFile(name); file->setReadOnly(set); reply.append((unsigned)RFEnoerror); @@ -4175,7 +4175,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface unsigned fPerms; msg.read(name).read(fPerms); if (TF_TRACE) - PROGLOG("setFilePerms, '%s' 0%o",name.get(),fPerms); + PROGLOG("setFilePerms, '%s' 0%o",name.get(),fPerms); Owned file=createIFile(name); file->setFilePermissions(fPerms); reply.append((unsigned)RFEnoerror); @@ -4186,7 +4186,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("getTime, '%s'",name.get()); + PROGLOG("getTime, '%s'",name.get()); Owned file=createIFile(name); CDateTime createTime; CDateTime modifiedTime; @@ -4222,7 +4222,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface accessedTime.deserialize(msg); if (TF_TRACE) - PROGLOG("setTime, '%s'",name.get()); + PROGLOG("setTime, '%s'",name.get()); Owned file=createIFile(name); bool ret = file->setTime(creategot?&createTime:NULL,modifiedgot?&modifiedTime:NULL,accessedgot?&accessedTime:NULL); @@ -4234,7 +4234,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("CreateDir, '%s'",name.get()); + PROGLOG("CreateDir, '%s'",name.get()); Owned dir=createIFile(name); bool ret = dir->createDirectory(); reply.append((unsigned)RFEnoerror).append(ret); @@ -4255,7 +4255,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface client.opendir.clear(); } if (TF_TRACE) - PROGLOG("GetDir, '%s', '%s', stream='%u'",name.get(),mask.get(),stream); + PROGLOG("GetDir, '%s', '%s', stream='%u'",name.get(),mask.get(),stream); if (!stream && !containsFileWildcard(mask)) { // if no streaming, and mask contains no wildcard, it is much more efficient to get the info without a directory iterator! @@ -4330,7 +4330,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface prev.setown(createRemoteDirectorIterator(ep, name, msg)); } if (TF_TRACE) - PROGLOG("MonitorDir, '%s' '%s'",name.get(),mask.get()); + PROGLOG("MonitorDir, '%s' '%s'",name.get(),mask.get()); Owned dir=createIFile(name); Owned iter=dir->monitorDirectory(prev,mask.length()?mask.get():NULL,sub,includedir,checkinterval,timeout); reply.append((unsigned)RFEnoerror); @@ -4523,7 +4523,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface StringAttr name; msg.read(name); if (TF_TRACE) - PROGLOG("getCRC, '%s'",name.get()); + PROGLOG("getCRC, '%s'",name.get()); Owned file=createIFile(name); unsigned ret = file->getCRC(); reply.append((unsigned)RFEnoerror).append(ret); @@ -5102,7 +5102,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface msg.append(results); catchWriteBuffer(client.socket, msg); - LOG(MCdebugProgress, unknownJob, "Results sent from slave: %s", client.peerName.str()); + LOG(MCdebugProgress, "Results sent from slave: %s", client.peerName.str()); } void formatException(MemoryBuffer &reply, IException *e, RemoteFileCommandType cmd, bool testSocketFlag, unsigned _dfsErrorCode, CRemoteClientHandler *client) diff --git a/roxie/ccd/ccd.hpp b/roxie/ccd/ccd.hpp index 1e793911e03..e73be1b2342 100644 --- a/roxie/ccd/ccd.hpp +++ b/roxie/ccd/ccd.hpp @@ -624,15 +624,15 @@ class ContextLogger : implements IRoxieContextLogger, public CInterface writer.outputEndArray("Log"); }; - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,5,0))) + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,4,0))) { StringBuffer text, prefix; getLogPrefix(prefix); text.valist_appendf(format, args); - CTXLOGa(LOG_TRACING, cat, job, code, prefix.str(), text.str()); + CTXLOGa(LOG_TRACING, cat, code, prefix.str(), text.str()); } - virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *prefix, const char *text) const override + virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, LogMsgCode code, const char *prefix, const char *text) const override { LogContextScope ls(nullptr); if (category == LOG_TRACING) @@ -660,7 +660,7 @@ class ContextLogger : implements IRoxieContextLogger, public CInterface { text.append(": ").valist_appendf(format, args); } - LOG(MCoperatorProgress, unknownJob, "[%s] %s", prefix, text.str()); + LOG(MCoperatorProgress, "[%s] %s", prefix, text.str()); if (intercept) { CriticalBlock b(crit); diff --git a/roxie/ccd/ccdcontext.cpp b/roxie/ccd/ccdcontext.cpp index b83ac4c321a..f42028f5cb1 100644 --- a/roxie/ccd/ccdcontext.cpp +++ b/roxie/ccd/ccdcontext.cpp @@ -1331,9 +1331,9 @@ class CRoxieContextBase : implements IRoxieAgentContext, implements ICodeContext { globalStats.recordStatistics(progress, false); } - virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *prefix, const char *text) const override + virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, LogMsgCode code, const char *prefix, const char *text) const override { - logctx.CTXLOGa(category, cat, job, code, prefix, text); + logctx.CTXLOGa(category, cat, code, prefix, text); } virtual void CTXLOGaeva(IException *E, const char *file, unsigned line, const char *prefix, const char *format, va_list args) const diff --git a/roxie/ccd/ccdserver.cpp b/roxie/ccd/ccdserver.cpp index 283cc022ca1..83785942d4b 100644 --- a/roxie/ccd/ccdserver.cpp +++ b/roxie/ccd/ccdserver.cpp @@ -240,13 +240,13 @@ class IndirectAgentContext : implements IRoxieAgentContext, public CInterface { return ctx->collectingDetailedStatistics(); } - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,5,0))) + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,4,0))) { - ctx->CTXLOGva(cat, job, code, format, args); + ctx->CTXLOGva(cat, code, format, args); } - virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *prefix, const char *text) const override + virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, LogMsgCode code, const char *prefix, const char *text) const override { - ctx->CTXLOGa(category, cat, job, code, prefix, text); + ctx->CTXLOGa(category, cat, code, prefix, text); } virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) { @@ -1327,14 +1327,14 @@ class CRoxieServerActivity : implements CInterfaceOf, impl } // MORE - most of this is copied from ccd.hpp - can't we refactor? - virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *prefix, const char *text) const override + virtual void CTXLOGa(TracingCategory category, const LogMsgCategory & cat, LogMsgCode code, const char *prefix, const char *text) const override { if (ctx) - ctx->CTXLOGa(category, cat, job, code, prefix, text); + ctx->CTXLOGa(category, cat, code, prefix, text); else { LogContextScope ls(nullptr); - LOG(cat, job, code, "[%s] %s", prefix, text); + LOG(cat, code, "[%s] %s", prefix, text); } } @@ -1357,7 +1357,7 @@ class CRoxieServerActivity : implements CInterfaceOf, impl { ss.append(": ").valist_appendf(format, args); } - LOG(MCoperatorProgress, unknownJob, "%s", ss.str()); + LOG(MCoperatorProgress, "%s", ss.str()); } } diff --git a/rtl/eclrtl/eclrtl.cpp b/rtl/eclrtl/eclrtl.cpp index 980ebf2198e..ec56e994c9d 100644 --- a/rtl/eclrtl/eclrtl.cpp +++ b/rtl/eclrtl/eclrtl.cpp @@ -4211,7 +4211,7 @@ ECLRTL_API unsigned rtlSleep(unsigned delay) ECLRTL_API unsigned rtlDisplay(unsigned len, const char * src) { - LOG(MCprogress, unknownJob, "%.*s", len, src); + LOG(MCprogress, "%.*s", len, src); return 0; } diff --git a/rtl/eclrtl/rtlbcdtest.cpp b/rtl/eclrtl/rtlbcdtest.cpp index ff9f8684522..ffdf112a3bb 100644 --- a/rtl/eclrtl/rtlbcdtest.cpp +++ b/rtl/eclrtl/rtlbcdtest.cpp @@ -36,7 +36,7 @@ static bool check(bool condition, const char *fmt, ...) { va_list args; va_start(args, fmt); - VALOG(MCdebugInfo, unknownJob, fmt, args); + VALOG(MCdebugInfo, fmt, args); va_end(args); } return condition; @@ -50,7 +50,7 @@ static void cppunit_assert(bool condition, const char *fmt, ...) { va_list args; va_start(args, fmt); - VALOG(MCdebugInfo, unknownJob, fmt, args); + VALOG(MCdebugInfo, fmt, args); va_end(args); CPPUNIT_ASSERT(!"Please refer to the errors above"); } diff --git a/system/jlib/jcontainerized.cpp b/system/jlib/jcontainerized.cpp index e80154ed7e6..5cbde1439c5 100644 --- a/system/jlib/jcontainerized.cpp +++ b/system/jlib/jcontainerized.cpp @@ -319,13 +319,13 @@ void runKubectlCommand(const char *title, const char *cmd, const char *input, St output = &_output; unsigned ret = runExternalCommand(title, *output, error, cmd, input, ".", nullptr); if (output->length()) - MLOG(MCdebugInfo, unknownJob, "%s: ret=%u, stdout=%s", cmd, ret, output->trimRight().str()); + MLOG(MCdebugInfo, "%s: ret=%u, stdout=%s", cmd, ret, output->trimRight().str()); if (error.length()) - MLOG(MCdebugError, unknownJob, "%s: ret=%u, stderr=%s", cmd, ret, error.trimRight().str()); + MLOG(MCdebugError, "%s: ret=%u, stderr=%s", cmd, ret, error.trimRight().str()); if (ret) { if (input) - MLOG(MCdebugError, unknownJob, "Using input %s", input); + MLOG(MCdebugError, "Using input %s", input); throw makeStringExceptionV(0, "Failed to run %s: error %u: %s", cmd, ret, error.str()); } } diff --git a/system/jlib/jdebug.cpp b/system/jlib/jdebug.cpp index 3aea22a4add..0620012ad37 100644 --- a/system/jlib/jdebug.cpp +++ b/system/jlib/jdebug.cpp @@ -2642,7 +2642,7 @@ class CUdpStatsReporter if (drops > ret->drops) { if (!firstTime) - LOG(MCoperatorError, unknownJob, "DROPPED UDP PACKETS: port %d rx_queue=%u (peak %u) drops=%u (total %i)", port, queue, ret->rx_queue, drops-ret->drops, drops); + LOG(MCoperatorError, "DROPPED UDP PACKETS: port %d rx_queue=%u (peak %u) drops=%u (total %i)", port, queue, ret->rx_queue, drops-ret->drops, drops); ret->drops = drops; } } @@ -2709,10 +2709,10 @@ class CSnmpStatsReporter { firstCall = false; if (errors) - LOG(MCoperatorWarning, unknownJob, "UDP Initial InError total: %u", errors); + LOG(MCoperatorWarning, "UDP Initial InError total: %u", errors); } else if (errors > prevErrors) - LOG(MCoperatorError, unknownJob, "UDP InErrors: %u (total %u)", errors-prevErrors, errors); + LOG(MCoperatorError, "UDP InErrors: %u (total %u)", errors-prevErrors, errors); prevErrors = errors; } } @@ -3001,7 +3001,7 @@ static class CMemoryUsageReporter: public Thread udpStats.reportUdpInfo(0); } if(traceMode&&str.length()) { - MLOG(MCdebugInfo, unknownJob, "SYS: %s", str.str()); + MLOG(MCdebugInfo, "SYS: %s", str.str()); #ifndef _WIN32 if (traceMode&PerfMonExtended) { diff --git a/system/jlib/jfile.cpp b/system/jlib/jfile.cpp index d0496dc84df..a21c13d4ca5 100644 --- a/system/jlib/jfile.cpp +++ b/system/jlib/jfile.cpp @@ -2261,7 +2261,7 @@ void CCheckingFileIO::report(const char * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugError, unknownJob, format, args); + VALOG(MCdebugError, format, args); va_end(args); if (!traced) { diff --git a/system/jlib/jlog.cpp b/system/jlib/jlog.cpp index ee6de055063..d96a54fe70e 100644 --- a/system/jlib/jlog.cpp +++ b/system/jlib/jlog.cpp @@ -318,13 +318,9 @@ void resetThreadLogging(const IContextLogger *_logctx, TraceFlags _traceFlags) threadTraceFlags = _traceFlags; } -const LogMsgJobInfo & checkDefaultJobInfo(const LogMsgJobInfo & _jobInfo) +const LogMsgJobInfo & queryDefaultJobInfo() { - if (&_jobInfo == &unknownJob) - { - return defaultJobInfo; - } - return _jobInfo; + return defaultJobInfo; } void setDefaultJobId(const char *id, bool threaded) @@ -345,21 +341,21 @@ LogMsg::LogMsg(LogMsgJobId id, const char *job) : category(MSGAUD_programmer, jo text.append(job); } -LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * _text, unsigned port, LogMsgSessionId session) - : category(_cat), sysInfo(_id, port, session), jobInfo(checkDefaultJobInfo(_jobInfo)), msgCode(_code), remoteFlag(false) +LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, const char * _text, unsigned port, LogMsgSessionId session) + : category(_cat), sysInfo(_id, port, session), jobInfo(queryDefaultJobInfo()), msgCode(_code), remoteFlag(false) { text.append(_text); } -LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, size32_t sz, const char * _text, unsigned port, LogMsgSessionId session) - : category(_cat), sysInfo(_id, port, session), jobInfo(checkDefaultJobInfo(_jobInfo)), msgCode(_code), remoteFlag(false) +LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, size32_t sz, const char * _text, unsigned port, LogMsgSessionId session) + : category(_cat), sysInfo(_id, port, session), jobInfo(queryDefaultJobInfo()), msgCode(_code), remoteFlag(false) { text.append(sz, _text); } -LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * format, va_list args, +LogMsg::LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, const char * format, va_list args, unsigned port, LogMsgSessionId session) - : category(_cat), sysInfo(_id, port, session), jobInfo(checkDefaultJobInfo(_jobInfo)), msgCode(_code), remoteFlag(false) + : category(_cat), sysInfo(_id, port, session), jobInfo(queryDefaultJobInfo()), msgCode(_code), remoteFlag(false) { text.valist_appendf(format, args); } @@ -1289,7 +1285,7 @@ void LogMsgPrepender::report(const LogMsgCategory & cat, const char * format, .. buff.append(file).append("(").append(line).append(") : ").append(format); va_list args; va_start(args, format); - queryLogMsgManager()->report_va(cat, unknownJob, buff.str(), args); + queryLogMsgManager()->report_va(cat, buff.str(), args); va_end(args); } @@ -1297,7 +1293,7 @@ void LogMsgPrepender::report_va(const LogMsgCategory & cat, const char * format, { StringBuffer buff; buff.append(file).append("(").append(line).append(") : ").append(format); - queryLogMsgManager()->report_va(cat, unknownJob, buff.str(), args); + queryLogMsgManager()->report_va(cat, buff.str(), args); } void LogMsgPrepender::report(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) @@ -1306,7 +1302,7 @@ void LogMsgPrepender::report(const LogMsgCategory & cat, LogMsgCode code, const buff.append(file).append("(").append(line).append(") : ").append(format); va_list args; va_start(args, format); - queryLogMsgManager()->report_va(cat, unknownJob, buff.str(), args); + queryLogMsgManager()->report_va(cat, buff.str(), args); va_end(args); } @@ -1314,7 +1310,7 @@ void LogMsgPrepender::report_va(const LogMsgCategory & cat, LogMsgCode code, con { StringBuffer buff; buff.append(file).append("(").append(line).append(") : ").append(format); - queryLogMsgManager()->report_va(cat, unknownJob, buff.str(), args); + queryLogMsgManager()->report_va(cat, buff.str(), args); } void LogMsgPrepender::report(const LogMsgCategory & cat, const IException * exception, const char * prefix) @@ -1323,55 +1319,12 @@ void LogMsgPrepender::report(const LogMsgCategory & cat, const IException * exce buff.append(file).append("(").append(line).append(") : "); if(prefix) buff.append(prefix).append(" : "); exception->errorMessage(buff); - queryLogMsgManager()->report(cat, unknownJob, exception->errorCode(), "%s", buff.str()); -} - -void LogMsgPrepender::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) -{ - StringBuffer buff; - buff.append(file).append("(").append(line).append(") : ").append(format); - va_list args; - va_start(args, format); - queryLogMsgManager()->report_va(cat, job, buff.str(), args); - va_end(args); -} - -void LogMsgPrepender::report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) -{ - StringBuffer buff; - buff.append(file).append("(").append(line).append(") : ").append(format); - queryLogMsgManager()->report_va(cat, job, buff.str(), args); -} - -void LogMsgPrepender::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) -{ - StringBuffer buff; - buff.append(file).append("(").append(line).append(") : ").append(format); - va_list args; - va_start(args, format); - queryLogMsgManager()->report_va(cat, job, buff.str(), args); - va_end(args); -} - -void LogMsgPrepender::report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args) -{ - StringBuffer buff; - buff.append(file).append("(").append(line).append(") : ").append(format); - queryLogMsgManager()->report_va(cat, job, buff.str(), args); -} - -void LogMsgPrepender::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * exception, const char * prefix) -{ - StringBuffer txt; - if (prefix) - txt.append(prefix).append(" : "); - exception->errorMessage(txt); - queryLogMsgManager()->report(cat, job, exception->errorCode(), "%s(%d) : %s", file, line, txt.str()); + queryLogMsgManager()->report(cat, exception->errorCode(), "%s", buff.str()); } IException * LogMsgPrepender::report(IException * e, const char * prefix, LogMsgClass cls) { - report(MCexception(e, cls), unknownJob, e, prefix); + report(MCexception(e, cls), e, prefix); return e; } @@ -1572,14 +1525,14 @@ void CLogMsgManager::report(const LogMsgCategory & cat, const char * format, ... if(rejectsCategory(cat)) return; va_list args; va_start(args, format); - pushMsg(new LogMsg(cat, getNextID(), unknownJob, NoLogMsgCode, format, args, port, session)); + pushMsg(new LogMsg(cat, getNextID(), NoLogMsgCode, format, args, port, session)); va_end(args); } void CLogMsgManager::report_va(const LogMsgCategory & cat, const char * format, va_list args) { if(rejectsCategory(cat)) return; - pushMsg(new LogMsg(cat, getNextID(), unknownJob, NoLogMsgCode, format, args, port, session)); + pushMsg(new LogMsg(cat, getNextID(), NoLogMsgCode, format, args, port, session)); } void CLogMsgManager::report(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) @@ -1587,17 +1540,17 @@ void CLogMsgManager::report(const LogMsgCategory & cat, LogMsgCode code, const c if(rejectsCategory(cat)) return; va_list args; va_start(args, format); - pushMsg(new LogMsg(cat, getNextID(), unknownJob, code, format, args, port, session)); + pushMsg(new LogMsg(cat, getNextID(), code, format, args, port, session)); va_end(args); } void CLogMsgManager::report_va(const LogMsgCategory & cat, LogMsgCode code, const char * format, va_list args) { if(rejectsCategory(cat)) return; - pushMsg(new LogMsg(cat, getNextID(), unknownJob, code, format, args, port, session)); + pushMsg(new LogMsg(cat, getNextID(), code, format, args, port, session)); } -void CLogMsgManager::mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg) +void CLogMsgManager::mreport_direct(const LogMsgCategory & cat, const char * msg) { if(rejectsCategory(cat)) return; const char *cursor = msg; @@ -1608,17 +1561,17 @@ void CLogMsgManager::mreport_direct(const LogMsgCategory & cat, const LogMsgJobI { case '\0': if (cursor != lineStart || cursor==msg) - pushMsg(new LogMsg(cat, getNextID(), job, NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); + pushMsg(new LogMsg(cat, getNextID(), NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); return; case '\r': // NB: \r or \r\n translated into newline - pushMsg(new LogMsg(cat, getNextID(), job, NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); + pushMsg(new LogMsg(cat, getNextID(), NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); if ('\n' == *(cursor+1)) cursor++; lineStart = cursor+1; break; case '\n': - pushMsg(new LogMsg(cat, getNextID(), job, NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); + pushMsg(new LogMsg(cat, getNextID(), NoLogMsgCode, (int)(cursor-lineStart), lineStart, port, session)); lineStart = cursor+1; break; } @@ -1626,12 +1579,12 @@ void CLogMsgManager::mreport_direct(const LogMsgCategory & cat, const LogMsgJobI } } -void CLogMsgManager::mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) +void CLogMsgManager::mreport_va(const LogMsgCategory & cat, const char * format, va_list args) { if(rejectsCategory(cat)) return; StringBuffer log; log.limited_valist_appendf(1024*1024, format, args); - mreport_direct(cat, job, log); + mreport_direct(cat, log); } void CLogMsgManager::report(const LogMsgCategory & cat, const IException * exception, const char * prefix) @@ -1640,46 +1593,7 @@ void CLogMsgManager::report(const LogMsgCategory & cat, const IException * excep StringBuffer buff; if(prefix) buff.append(prefix).append(" : "); exception->errorMessage(buff); - pushMsg(new LogMsg(cat, getNextID(), unknownJob, exception->errorCode(), buff.str(), port, session)); -} - -void CLogMsgManager::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) -{ - if(rejectsCategory(cat)) return; - va_list args; - va_start(args, format); - pushMsg(new LogMsg(cat, getNextID(), job, NoLogMsgCode, format, args, port, session)); - va_end(args); -} - -void CLogMsgManager::report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) -{ - if(rejectsCategory(cat)) return; - pushMsg(new LogMsg(cat, getNextID(), job, NoLogMsgCode, format, args, port, session)); -} - -void CLogMsgManager::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) -{ - if(rejectsCategory(cat)) return; - va_list args; - va_start(args, format); - pushMsg(new LogMsg(cat, getNextID(), job, code, format, args, port, session)); - va_end(args); -} - -void CLogMsgManager::report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args) -{ - if(rejectsCategory(cat)) return; - pushMsg(new LogMsg(cat, getNextID(), job, code, format, args, port, session)); -} - -void CLogMsgManager::report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * exception, const char * prefix) -{ - if(rejectsCategory(cat)) return; - StringBuffer buff; - if(prefix) buff.append(prefix).append(" : "); - exception->errorMessage(buff); - pushMsg(new LogMsg(cat, getNextID(), job, exception->errorCode(), buff.str(), port, session)); + pushMsg(new LogMsg(cat, getNextID(), exception->errorCode(), buff.str(), port, session)); } void CLogMsgManager::pushMsg(LogMsg * _msg) @@ -2325,13 +2239,8 @@ class CNullManager : implements ILogMsgManager virtual void report(const LogMsgCategory & cat, LogMsgCode code , const char * format, ...) override {} virtual void report_va(const LogMsgCategory & cat, LogMsgCode code , const char * format, va_list args) override {} virtual void report(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL) override {} - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) override {} - virtual void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) override {} - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, ...) override {} - virtual void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, va_list args) override {} - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL) override {} - virtual void mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg) override {} - virtual void mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) override {} + virtual void mreport_direct(const LogMsgCategory & cat, const char * msg) override {} + virtual void mreport_va(const LogMsgCategory & cat, const char * format, va_list args) override {} virtual void report(const LogMsg & msg) const override {} virtual LogMsgId getNextID() override { return 0; } virtual bool rejectsCategory(const LogMsgCategory & cat) const override { return true; } @@ -2781,7 +2690,7 @@ void IContextLogger::CTXLOG(const char *format, ...) const { va_list args; va_start(args, format); - CTXLOGva(MCdebugInfo, queryJob(), NoLogMsgCode, format, args); + CTXLOGva(MCdebugInfo, NoLogMsgCode, format, args); va_end(args); } @@ -2842,9 +2751,9 @@ class DummyLogCtx : implements IContextLogger virtual void Link() const {} virtual bool Release() const { return false; } - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,5,0))) + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const override __attribute__((format(printf,4,0))) { - VALOG(cat, job, code, format, args); + VALOG(cat, code, format, args); } virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) { @@ -2858,7 +2767,7 @@ class DummyLogCtx : implements IContextLogger E->errorMessage(ss.append(": ")); if (format) ss.append(": ").valist_appendf(format, args); - LOG(MCoperatorProgress, queryJob(), "%s", ss.str()); + LOG(MCoperatorProgress, "%s", ss.str()); } virtual void noteStatistic(StatisticKind kind, unsigned __int64 value) const { @@ -3430,65 +3339,31 @@ void ctxlogReport(const LogMsgCategory & cat, const char * format, ...) { va_list args; va_start(args, format); - ctxlogReportVA(cat, unknownJob, NoLogMsgCode, format, args); + ctxlogReportVA(cat, NoLogMsgCode, format, args); va_end(args); } void ctxlogReportVA(const LogMsgCategory & cat, const char * format, va_list args) { - ctxlogReportVA(cat, unknownJob, NoLogMsgCode, format, args); + ctxlogReportVA(cat, NoLogMsgCode, format, args); } void ctxlogReport(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) { va_list args; va_start(args, format); - ctxlogReportVA(cat, unknownJob, code, format, args); + ctxlogReportVA(cat, code, format, args); va_end(args); } void ctxlogReportVA(const LogMsgCategory & cat, LogMsgCode code, const char * format, va_list args) { - ctxlogReportVA(cat, unknownJob, code, format, args); + ctxlogReportVA(cat, code, format, args); } void ctxlogReport(const LogMsgCategory & cat, const IException * e, const char * prefix) { - ctxlogReport(cat, unknownJob, e, prefix); -} -void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) -{ - va_list args; - va_start(args, format); - ctxlogReportVA(cat, job, NoLogMsgCode, format, args); - va_end(args); -} -void ctxlogReportVA(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) -{ - ctxlogReportVA(cat, job, NoLogMsgCode, format, args); -} -void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) -{ - va_list args; - va_start(args, format); - ctxlogReportVA(cat, job, code, format, args); - va_end(args); -} -void ctxlogReportVA(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args) -{ - if (default_thread_logctx) - { - LogContextScope ls(nullptr); - ls.prev->CTXLOGva(cat, job, code, format, args); - } - else - queryLogMsgManager()->report_va(cat, job, code, format, args); -} -void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix) -{ - StringBuffer buff; - e->errorMessage(buff); - ctxlogReport(cat, job, e->errorCode(), "%s%s%s", prefix ? prefix : "", prefix ? prefix : " : ", buff.str()); + ctxlogReport(cat, e, prefix); } IException * ctxlogReport(IException * e, const char * prefix, LogMsgClass cls) { - ctxlogReport(MCexception(e, cls), unknownJob, e, prefix); + ctxlogReport(MCexception(e, cls), e, prefix); return e; } diff --git a/system/jlib/jlog.hpp b/system/jlib/jlog.hpp index ca142787684..6859b9d74f4 100644 --- a/system/jlib/jlog.hpp +++ b/system/jlib/jlog.hpp @@ -593,10 +593,10 @@ class jlib_decl LogMsg : public CInterface public: LogMsg() : category(), sysInfo(), jobInfo(), remoteFlag(false) {} LogMsg(LogMsgJobId id, const char *job); // Used for tracking job ids - LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * _text, unsigned port, LogMsgSessionId session); - LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, size32_t sz, const char * _text, unsigned port, LogMsgSessionId session); - LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * format, va_list args, - unsigned port, LogMsgSessionId session) __attribute__((format(printf,6, 0))); + LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, const char * _text, unsigned port, LogMsgSessionId session); + LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, size32_t sz, const char * _text, unsigned port, LogMsgSessionId session); + LogMsg(const LogMsgCategory & _cat, LogMsgId _id, LogMsgCode _code, const char * format, va_list args, + unsigned port, LogMsgSessionId session) __attribute__((format(printf,5, 0))); StringBuffer & toStringPlain(StringBuffer & out, unsigned fields) const; StringBuffer & toStringXML(StringBuffer & out, unsigned fields) const; StringBuffer & toStringJSON(StringBuffer & out, unsigned fields) const; @@ -722,13 +722,8 @@ interface jlib_decl ILogMsgManager : public ILogMsgListener virtual void report(const LogMsgCategory & cat, LogMsgCode code , const char * format, ...) __attribute__((format(printf, 4, 5))) = 0; virtual void report_va(const LogMsgCategory & cat, LogMsgCode code , const char * format, va_list args) = 0; virtual void report(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL) = 0; - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) __attribute__((format(printf, 4, 5))) = 0; - virtual void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) = 0; - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, ...) __attribute__((format(printf, 5, 6))) = 0; - virtual void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, va_list args) = 0; - virtual void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL) = 0; - virtual void mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg) = 0; - virtual void mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) = 0; + virtual void mreport_direct(const LogMsgCategory & cat, const char * msg) = 0; + virtual void mreport_va(const LogMsgCategory & cat, const char * format, va_list args) = 0; virtual void report(const LogMsg & msg) const = 0; virtual LogMsgId getNextID() = 0; virtual bool rejectsCategory(const LogMsgCategory & cat) const = 0; @@ -751,12 +746,7 @@ class jlib_decl LogMsgPrepender void report(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) __attribute__((format(printf, 4, 5))); void report_va(const LogMsgCategory & cat, LogMsgCode code, const char * format, va_list args); void report(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) __attribute__((format(printf, 4, 5))); - void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) __attribute__((format(printf, 5, 6))); - void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL); - IException * report(IException * e, const char * prefix = NULL, LogMsgClass cls = MSGCLS_error); // uses MCexception(e, cls), unknownJob, handy for EXCLOG + IException * report(IException * e, const char * prefix = NULL, LogMsgClass cls = MSGCLS_error); // uses MCexception(e, cls), handy for EXCLOG private: char const * file; unsigned line; @@ -911,30 +901,10 @@ inline void LOG(const LogMsgCategory & cat, LogMsgCode code , const char * forma LOGMSGREPORTER->report_va(cat, code , format, args); va_end(args); } -inline void LOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) __attribute__((format(printf, 3, 4))); -inline void LOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) -{ - va_list args; - va_start(args, format); - LOGMSGREPORTER->report_va(cat, job, format, args); - va_end(args); -} -inline void LOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, ...) __attribute__((format(printf, 4, 5))); -inline void LOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, ...) -{ - va_list args; - va_start(args, format); - LOGMSGREPORTER->report_va(cat, job, code , format, args); - va_end(args); -} inline void LOG(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL) { LOGMSGREPORTER->report(cat, e, prefix); } -inline void LOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL) -{ - LOGMSGREPORTER->report(cat, job, e, prefix); -} inline void VALOG(const LogMsgCategory & cat, const char * format, va_list args) { LOGMSGREPORTER->report_va(cat, format, args); @@ -943,14 +913,6 @@ inline void VALOG(const LogMsgCategory & cat, LogMsgCode code , const char * for { LOGMSGREPORTER->report_va(cat, code , format, args); } -inline void VALOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) -{ - LOGMSGREPORTER->report_va(cat, job, format, args); -} -inline void VALOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, va_list args) -{ - LOGMSGREPORTER->report_va(cat, job, code , format, args); -} #else #define LOG LOGMSGREPORTER->report #define VALOG LOGMSGREPORTER->report_va @@ -961,12 +923,7 @@ extern jlib_decl void ctxlogReportVA(const LogMsgCategory & cat, const char * fo extern jlib_decl void ctxlogReport(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) __attribute__((format(printf, 3, 4))); extern jlib_decl void ctxlogReportVA(const LogMsgCategory & cat, LogMsgCode code, const char * format, va_list args) __attribute__((format(printf, 3, 0))); extern jlib_decl void ctxlogReport(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL); -extern jlib_decl void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) __attribute__((format(printf, 3, 4))); -extern jlib_decl void ctxlogReportVA(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) __attribute__((format(printf, 3, 0))); -extern jlib_decl void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) __attribute__((format(printf, 4, 5))); -extern jlib_decl void ctxlogReportVA(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args) __attribute__((format(printf, 4, 0))); -extern jlib_decl void ctxlogReport(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL); -extern jlib_decl IException * ctxlogReport(IException * e, const char * prefix = NULL, LogMsgClass cls = MSGCLS_error); // uses MCexception(e, cls), unknownJob, handy for EXCLOG +extern jlib_decl IException * ctxlogReport(IException * e, const char * prefix = NULL, LogMsgClass cls = MSGCLS_error); // uses MCexception(e, cls), handy for EXCLOG #define LOG ::ctxlogReport #define VALOG ::ctxlogReportVA @@ -977,7 +934,7 @@ inline void DBGLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugInfo, unknownJob, format, args); + VALOG(MCdebugInfo, format, args); va_end(args); } @@ -986,7 +943,7 @@ inline void DISLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorDisaster, unknownJob, format, args); + VALOG(MCoperatorDisaster, format, args); va_end(args); } @@ -995,7 +952,7 @@ inline void UERRLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserError, unknownJob, format, args); + VALOG(MCuserError, format, args); va_end(args); } @@ -1007,7 +964,7 @@ inline void OERRLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorError, unknownJob, format, args); + VALOG(MCoperatorError, format, args); va_end(args); } @@ -1016,7 +973,7 @@ inline void IERRLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugError, unknownJob, format, args); + VALOG(MCdebugError, format, args); va_end(args); } @@ -1025,7 +982,7 @@ inline void AERRLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCauditError, unknownJob, format, args); + VALOG(MCauditError, format, args); va_end(args); } @@ -1035,7 +992,7 @@ inline void UWARNLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserWarning, unknownJob, format, args); + VALOG(MCuserWarning, format, args); va_end(args); } @@ -1047,7 +1004,7 @@ inline void OWARNLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorWarning, unknownJob, format, args); + VALOG(MCoperatorWarning, format, args); va_end(args); } @@ -1056,7 +1013,7 @@ inline void IWARNLOG(char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugWarning, unknownJob, format, args); + VALOG(MCdebugWarning, format, args); va_end(args); } @@ -1065,28 +1022,20 @@ inline void PROGLOG(const char * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserProgress, unknownJob, format, args); + VALOG(MCuserProgress, format, args); va_end(args); } inline void MLOG(const LogMsgCategory & cat, const char * msg) { - LOGMSGREPORTER->mreport_direct(cat, unknownJob, msg); -} - -inline void MLOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) -{ - va_list args; - va_start(args, format); - LOGMSGREPORTER->mreport_va(cat, job, format, args); - va_end(args); + LOGMSGREPORTER->mreport_direct(cat, msg); } inline void MLOG(const LogMsgCategory & cat, const char * format, ...) { va_list args; va_start(args, format); - LOGMSGREPORTER->mreport_va(cat, unknownJob, format, args); + LOGMSGREPORTER->mreport_va(cat, format, args); va_end(args); } @@ -1095,7 +1044,7 @@ inline void MLOG(const char * format, ...) { va_list args; va_start(args, format); - LOGMSGREPORTER->mreport_va(MCuserProgress, unknownJob, format, args); + LOGMSGREPORTER->mreport_va(MCuserProgress, format, args); va_end(args); } @@ -1104,7 +1053,7 @@ inline void DBGLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugInfo, unknownJob, code, format, args); + VALOG(MCdebugInfo, code, format, args); va_end(args); } @@ -1113,7 +1062,7 @@ inline void DISLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorDisaster, unknownJob, code, format, args); + VALOG(MCoperatorDisaster, code, format, args); va_end(args); } @@ -1122,7 +1071,7 @@ inline void UWARNLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserWarning, unknownJob, code, format, args); + VALOG(MCuserWarning, code, format, args); va_end(args); } @@ -1131,7 +1080,7 @@ inline void OWARNLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorWarning, unknownJob, code, format, args); + VALOG(MCoperatorWarning, code, format, args); va_end(args); } @@ -1140,7 +1089,7 @@ inline void IWARNLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugWarning, unknownJob, code, format, args); + VALOG(MCdebugWarning, code, format, args); va_end(args); } @@ -1164,7 +1113,7 @@ inline void OERRLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCoperatorError, unknownJob, code, format, args); + VALOG(MCoperatorError, code, format, args); va_end(args); } @@ -1173,7 +1122,7 @@ inline void IERRLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCdebugError, unknownJob, code, format, args); + VALOG(MCdebugError, code, format, args); va_end(args); } @@ -1182,7 +1131,7 @@ inline void UERRLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserError, unknownJob, code, format, args); + VALOG(MCuserError, code, format, args); va_end(args); } @@ -1191,7 +1140,7 @@ inline void PROGLOG(LogMsgCode code, char const * format, ...) { va_list args; va_start(args, format); - VALOG(MCuserProgress, unknownJob, code, format, args); + VALOG(MCuserProgress, code, format, args); va_end(args); } @@ -1259,7 +1208,7 @@ interface jlib_decl IContextLogger : extends IInterface { virtual void CTXLOG(const char *format, ...) const __attribute__((format(printf, 2, 3))); virtual void mCTXLOG(const char *format, ...) const __attribute__((format(printf, 2, 3))); - virtual void CTXLOGva(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char *format, va_list args) const __attribute__((format(printf,5,0))) = 0; + virtual void CTXLOGva(const LogMsgCategory & cat, LogMsgCode code, const char *format, va_list args) const __attribute__((format(printf,4,0))) = 0; void logOperatorException(IException *E, const char *file, unsigned line, const char *format, ...) const __attribute__((format(printf, 5, 6))); virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) = 0; virtual void noteStatistic(StatisticKind kind, unsigned __int64 value) const = 0; @@ -1277,7 +1226,6 @@ interface jlib_decl IContextLogger : extends IInterface virtual IProperties * getClientHeaders() const = 0; virtual void setSpanAttribute(const char *name, const char *value) const = 0; virtual void recordStatistics(IStatisticGatherer &progress) const = 0; - virtual const LogMsgJobInfo & queryJob() const { return unknownJob; } }; using ContextSpanScope = ContextSpanScopeImp; diff --git a/system/jlib/jlog.ipp b/system/jlib/jlog.ipp index bfd06cb5f21..56943ecc38c 100644 --- a/system/jlib/jlog.ipp +++ b/system/jlib/jlog.ipp @@ -740,16 +740,11 @@ public: bool flushQueue(unsigned timeout) { if(processor) return processor->flush(timeout); else return true; } void report(const LogMsgCategory & cat, const char * format, ...) __attribute__((format(printf,3,4))); void report_va(const LogMsgCategory & cat, const char * format, va_list args) __attribute__((format(printf,3,0))); - void mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg); - void mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) __attribute__((format(printf,4,0))); + void mreport_direct(const LogMsgCategory & cat, const char * msg); + void mreport_va(const LogMsgCategory & cat, const char * format, va_list args) __attribute__((format(printf,3,0))); void report(const LogMsgCategory & cat, LogMsgCode code, const char * format, ...) __attribute__((format(printf,4,5))); void report_va(const LogMsgCategory & cat, LogMsgCode code, const char * format, va_list args) __attribute__((format(printf,4,0))); void report(const LogMsgCategory & cat, const IException * e, const char * prefix = NULL); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...) __attribute__((format(printf,4,5))); - void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) __attribute__((format(printf,4,0))); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, ...) __attribute__((format(printf,5,6))); - void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args) __attribute__((format(printf,5,0))); - void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL); void report(const LogMsg & msg) const { if(prefilter.includeCategory(msg.queryCategory())) doReport(msg); } bool addMonitor(ILogMsgHandler * handler, ILogMsgFilter * filter); bool addMonitorOwn(ILogMsgHandler * handler, ILogMsgFilter * filter); @@ -814,7 +809,7 @@ private: class DropLogMsg : public LogMsg { public: - DropLogMsg(CLogMsgManager * owner, LogMsgId id, unsigned _count) : LogMsg(dropWarningCategory, id, unknownJob, NoLogMsgCode, "MISSING LOG MESSAGES: ", owner->port, owner->session), count(_count) + DropLogMsg(CLogMsgManager * owner, LogMsgId id, unsigned _count) : LogMsg(dropWarningCategory, id, NoLogMsgCode, "MISSING LOG MESSAGES: ", owner->port, owner->session), count(_count) { text.append("message queue length exceeded, dropped ").append(count).append(" messages"); } diff --git a/system/jlib/jmisc.cpp b/system/jlib/jmisc.cpp index 7f0d55d5e74..9d1fbf5d504 100644 --- a/system/jlib/jmisc.cpp +++ b/system/jlib/jmisc.cpp @@ -251,7 +251,7 @@ jlib_decl void PrintMemoryStatusLog() #ifdef _WIN32 MEMORYSTATUS mS; GlobalMemoryStatus(&mS); - LOG(MCdebugInfo, unknownJob, "Available Physical Memory = %dK", (unsigned)(mS.dwAvailPhys/1024)); + LOG(MCdebugInfo, "Available Physical Memory = %dK", (unsigned)(mS.dwAvailPhys/1024)); #ifdef FRAGMENTATION_CHECK // see if fragmented size32_t sz = MAX_TRY_SIZE; @@ -267,7 +267,7 @@ jlib_decl void PrintMemoryStatusLog() } sz *= 2; if ((szRelease(); } } @@ -969,7 +969,7 @@ protected: friend class CMPPacketReader; { StringBuffer str; #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: connecting to %s role: %" I64F "u", remoteep.getEndpointHostText(str).str(), parent->getRole()); + LOG(MCdebugInfo, "MP: connecting to %s role: %" I64F "u", remoteep.getEndpointHostText(str).str(), parent->getRole()); #endif if (((int)tm.timeout)<0) remaining = CONNECT_TIMEOUT; @@ -1005,7 +1005,7 @@ protected: friend class CMPPacketReader; newsock->set_keep_alive(true); #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "MP: connect after socket connect, retrycount = %d", retrycount); + LOG(MCdebugInfo, "MP: connect after socket connect, retrycount = %d", retrycount); #endif SocketEndpoint hostep; @@ -1024,13 +1024,13 @@ protected: friend class CMPPacketReader; connectHdr.id[0].getEndpointHostText(tmp1); tmp1.append(' '); connectHdr.id[1].getEndpointHostText(tmp1); - LOG(MCdebugInfo, unknownJob, "MP: connect after socket write %s",tmp1.str()); + LOG(MCdebugInfo, "MP: connect after socket write %s",tmp1.str()); #endif size32_t rd = 0; #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: connect after socket write, waiting for read"); + LOG(MCdebugInfo, "MP: connect after socket write, waiting for read"); #endif // Wait for connection reply but also check for A<->B deadlock (where both processes are here @@ -1110,7 +1110,7 @@ protected: friend class CMPPacketReader; // if other side closes, connect again if (e->errorCode() == JSOCKERR_graceful_close) { - LOG(MCdebugInfo, unknownJob, "MP: Retrying (other side closed connection, probably due to clash)"); + LOG(MCdebugInfo, "MP: Retrying (other side closed connection, probably due to clash)"); e->Release(); break; } @@ -1118,7 +1118,7 @@ protected: friend class CMPPacketReader; e->Release(); #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: Retrying connection to %s, %d attempts left",remoteep.getEndpointHostText(str).str(),retrycount+1); + LOG(MCdebugInfo, "MP: Retrying connection to %s, %d attempts left",remoteep.getEndpointHostText(str).str(),retrycount+1); #endif } else @@ -1145,7 +1145,7 @@ protected: friend class CMPPacketReader; size32_t replyVal; memcpy(&replyVal, (size32_t *)replyBuf, sizeof(size32_t)); #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: connect after socket read replyVal=%u, sizeof(connectHdr)=%lu", replyVal, sizeof(connectHdr)); + LOG(MCdebugInfo, "MP: connect after socket read replyVal=%u, sizeof(connectHdr)=%lu", replyVal, sizeof(connectHdr)); #endif if (replyVal > sizeof(ConnectHdr)) { @@ -1191,7 +1191,7 @@ protected: friend class CMPPacketReader; if (attachSocket(newsock,remoteep,hostep,true,NULL,addrval)) { #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: connected to %s",str.str()); + LOG(MCdebugInfo, "MP: connected to %s",str.str()); #endif lastxfer = msTick(); closed = false; @@ -1222,7 +1222,7 @@ protected: friend class CMPPacketReader; #ifdef _TRACE StringBuffer str; str.clear(); - LOG(MCdebugInfo, unknownJob, "MP: Retrying connection to %s, %d attempts left",remoteep.getEndpointHostText(str).str(),retrycount+1); + LOG(MCdebugInfo, "MP: Retrying connection to %s, %d attempts left",remoteep.getEndpointHostText(str).str(),retrycount+1); #endif } @@ -1276,7 +1276,7 @@ protected: friend class CMPPacketReader; CriticalBlock block(connectsect); if (closed) { #ifdef _TRACELINKCLOSED - LOG(MCdebugInfo, unknownJob, "WritePacket closed on entry"); + LOG(MCdebugInfo, "WritePacket closed on entry"); PrintStackReport(); #endif if (!checkReconnect(tm)) @@ -1285,7 +1285,7 @@ protected: friend class CMPPacketReader; if (!channelsock) { if (!connect(tm)) { #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "WritePacket connect failed"); + LOG(MCdebugInfo, "WritePacket connect failed"); #endif return false; } @@ -1311,7 +1311,7 @@ protected: friend class CMPPacketReader; #ifdef _FULLTRACE StringBuffer ep1; StringBuffer ep2; - LOG(MCdebugInfo, unknownJob, "WritePacket(target=%s,(%d,%d,%d))",remoteep.getEndpointHostText(ep1).str(),hdrsize,hdr2size,bodysize); + LOG(MCdebugInfo, "WritePacket(target=%s,(%d,%d,%d))",remoteep.getEndpointHostText(ep1).str(),hdrsize,hdr2size,bodysize); unsigned t2 = msTick(); #endif unsigned n = 0; @@ -1330,17 +1330,17 @@ protected: friend class CMPPacketReader; sizes[n++] = bodysize; } if (!dest) { - LOG(MCdebugInfo, unknownJob, "MP Warning: WritePacket unexpected NULL socket"); + LOG(MCdebugInfo, "MP Warning: WritePacket unexpected NULL socket"); return false; } dest->write_multiple(n,bufs,sizes); lastxfer = msTick(); #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "WritePacket(timewaiting=%d,timesending=%d)",t2-t1,lastxfer-t2); + LOG(MCdebugInfo, "WritePacket(timewaiting=%d,timesending=%d)",t2-t1,lastxfer-t2); #endif } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP writepacket"); + FLLOG(MCoperatorWarning, e,"MP writepacket"); closeSocket(false, true); throw; } @@ -1383,11 +1383,11 @@ protected: friend class CMPPacketReader; return false; } if (tm.timedout()) { - LOG(MCdebugInfo, unknownJob, "MP: verify, ping failed to %s",ep.str()); + LOG(MCdebugInfo, "MP: verify, ping failed to %s",ep.str()); closeSocket(); return false; } - LOG(MCdebugInfo, unknownJob, "MP: verify, ping failed to %s, retrying",ep.str()); + LOG(MCdebugInfo, "MP: verify, ping failed to %s, retrying",ep.str()); unsigned remaining; if (!pingtm.timedout(&remaining)&&remaining) Sleep(remaining); @@ -1501,7 +1501,7 @@ class UserPacketHandler // default #ifdef _FULLTRACE StringBuffer ep1; StringBuffer ep2; - LOG(MCdebugInfo, unknownJob, "MP: send(target=%s,sender=%s,tag=%d,replytag=%d,size=%d)",hdr.target.getEndpointHostText(ep1).str(),hdr.sender.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); + LOG(MCdebugInfo, "MP: send(target=%s,sender=%s,tag=%d,replytag=%d,size=%d)",hdr.target.getEndpointHostText(ep1).str(),hdr.sender.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); #endif return channel->writepacket(&hdr,sizeof(hdr),mb.toByteArray(),mb.length(),tm); } @@ -1565,7 +1565,7 @@ class MultiPacketHandler // TAG_SYS_MULTI otherMhdr->getDetails(errorMsg).newline(); } msg.getDetails(errorMsg); - LOG(MCerror, unknownJob, "MultiPacketHandler: protocol error (%d) %s", code, errorMsg.str()); + LOG(MCerror, "MultiPacketHandler: protocol error (%d) %s", code, errorMsg.str()); } lastErrMs = ms; } @@ -1633,7 +1633,7 @@ class MultiPacketHandler // TAG_SYS_MULTI #ifdef _FULLTRACE StringBuffer ep1; StringBuffer ep2; - LOG(MCdebugInfo, unknownJob, "MP: multi-send(target=%s,sender=%s,tag=%d,replytag=%d,size=%d)",hdr.target.getEndpointHostText(ep1).str(),hdr.sender.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); + LOG(MCdebugInfo, "MP: multi-send(target=%s,sender=%s,tag=%d,replytag=%d,size=%d)",hdr.target.getEndpointHostText(ep1).str(),hdr.sender.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); #endif PacketHeader outhdr; outhdr = hdr; @@ -1651,13 +1651,13 @@ class MultiPacketHandler // TAG_SYS_MULTI if (i+1==mhdr.numparts) mhdr.size = mhdr.total-mhdr.ofs; #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "MP: multi-send block=%d, num blocks=%d, ofs=%d, size=%d",i,mhdr.numparts,mhdr.ofs,mhdr.size); + LOG(MCdebugInfo, "MP: multi-send block=%d, num blocks=%d, ofs=%d, size=%d",i,mhdr.numparts,mhdr.ofs,mhdr.size); #endif outhdr.initseq(); outhdr.size = sizeof(outhdr)+sizeof(mhdr)+mhdr.size; if (!channel->writepacket(&outhdr,sizeof(outhdr),&mhdr,sizeof(mhdr),p,mhdr.size,tm)) { #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "MP: multi-send failed"); + LOG(MCdebugInfo, "MP: multi-send failed"); #endif return false; } @@ -1746,7 +1746,7 @@ class CMPPacketReader: public ISocketSelectNotify, public CInterface if (pc) { #ifdef _TRACELINKCLOSED - LOG(MCdebugInfo, unknownJob, "CMPPacketReader::notifySelected() about to close socket, mode = 0x%x", selected); + LOG(MCdebugInfo, "CMPPacketReader::notifySelected() about to close socket, mode = 0x%x", selected); #endif pc->closeSocket(false, true); } @@ -1766,7 +1766,7 @@ class CMPPacketReader: public ISocketSelectNotify, public CInterface // assumes packet header will arrive in one go if (sizeavailread(&hdr,sizeof(hdr),sizeof(hdr),szread,60); // I don't *really* want to block here but not much else can do @@ -1787,7 +1787,7 @@ class CMPPacketReader: public ISocketSelectNotify, public CInterface #ifdef _FULLTRACE StringBuffer ep1; StringBuffer ep2; - LOG(MCdebugInfo, unknownJob, "MP: ReadPacket(sender=%s,target=%s,tag=%d,replytag=%d,size=%d)",hdr.sender.getEndpointHostText(ep1).str(),hdr.target.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); + LOG(MCdebugInfo, "MP: ReadPacket(sender=%s,target=%s,tag=%d,replytag=%d,size=%d)",hdr.sender.getEndpointHostText(ep1).str(),hdr.target.getEndpointHostText(ep2).str(),hdr.tag,hdr.replytag,hdr.size); #endif remaining = hdr.size-sizeof(hdr); activemsg = new CMessageBuffer(remaining); // will get from low level IO at some stage @@ -1807,7 +1807,7 @@ class CMPPacketReader: public ISocketSelectNotify, public CInterface if (remaining==0) { // we have the packet so process #ifdef _FULLTRACE - LOG(MCdebugInfo, unknownJob, "MP: ReadPacket(timetaken = %d,select iterations=%d)",msTick()-parent->startxfer,parent->numiter); + LOG(MCdebugInfo, "MP: ReadPacket(timetaken = %d,select iterations=%d)",msTick()-parent->startxfer,parent->numiter); #endif do { switch (activemsg->getTag()) { @@ -1843,7 +1843,7 @@ class CMPPacketReader: public ISocketSelectNotify, public CInterface } catch (IException *e) { if (e->errorCode()!=JSOCKERR_graceful_close) - FLLOG(MCoperatorWarning, unknownJob, e,"MP(Packet Reader)"); + FLLOG(MCoperatorWarning, e,"MP(Packet Reader)"); e->Release(); } // error here, so close socket (ignore error as may be closed already) @@ -1939,30 +1939,30 @@ bool CMPChannel::attachSocket(ISocket *newsock,const SocketEndpoint &_remoteep,c StringBuffer ep2; _localep.getEndpointHostText(ep1); _remoteep.getEndpointHostText(ep2); - LOG(MCdebugInfo, unknownJob, "MP: Possible clash between %s->%s %d(%d)",ep1.str(),ep2.str(),(int)ismaster,(int)master); + LOG(MCdebugInfo, "MP: Possible clash between %s->%s %d(%d)",ep1.str(),ep2.str(),(int)ismaster,(int)master); try { if (ismaster!=master) { if (ismaster) { - LOG(MCdebugInfo, unknownJob, "MP: resolving socket attach clash (master)"); + LOG(MCdebugInfo, "MP: resolving socket attach clash (master)"); return false; } else { Sleep(50); // give the other side some time to close CTimeMon tm(10000); if (verifyConnection(tm,false)) { - LOG(MCdebugInfo, unknownJob, "MP: resolving socket attach clash (verified)"); + LOG(MCdebugInfo, "MP: resolving socket attach clash (verified)"); return false; } } } } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP attachsocket(1)"); + FLLOG(MCoperatorWarning, e,"MP attachsocket(1)"); e->Release(); } try { - LOG(MCdebugInfo, unknownJob, "Message Passing - removing stale socket to %s",ep2.str()); + LOG(MCdebugInfo, "Message Passing - removing stale socket to %s",ep2.str()); CriticalUnblock unblock(connectsect); closeSocket(true, true); #ifdef REFUSE_STALE_CONNECTION @@ -1972,7 +1972,7 @@ bool CMPChannel::attachSocket(ISocket *newsock,const SocketEndpoint &_remoteep,c Sleep(100); // pause to allow close socket triggers to run } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP attachsocket(2)"); + FLLOG(MCoperatorWarning, e,"MP attachsocket(2)"); e->Release(); } } @@ -2010,7 +2010,7 @@ bool CMPChannel::send(MemoryBuffer &mb, mptag_t tag, mptag_t replytag, CTimeMon if (closed||(reply&&!isConnected())) // flag error if has been disconnected { #ifdef _TRACELINKCLOSED - LOG(MCdebugInfo, unknownJob, "CMPChannel::send closed on entry %d",(int)closed); + LOG(MCdebugInfo, "CMPChannel::send closed on entry %d",(int)closed); PrintStackReport(); #endif if (!checkReconnect(tm)) @@ -2087,7 +2087,7 @@ bool CMPChannel::sendPing(CTimeMon &tm) ret = parent->pingpackethandler->send(this,hdr,tm)&&!tm.timedout(&remaining); } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP ping(1)"); + FLLOG(MCoperatorWarning, e,"MP ping(1)"); e->Release(); } sendmutex.unlock(); @@ -2117,7 +2117,7 @@ bool CMPChannel::sendPingReply(unsigned timeout,bool identifyself) ret = parent->pingreplypackethandler->send(this,hdr,mb,mon); } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP ping reply(1)"); + FLLOG(MCoperatorWarning, e,"MP ping reply(1)"); e->Release(); ret = false; } @@ -2225,7 +2225,7 @@ CMPConnectThread::CMPConnectThread(CMPServer *_parent, unsigned port, bool _list listensock = NULL; // delay create till running parent->setPort(port); #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP Connect Thread Init Port = %d", port); + LOG(MCdebugInfo, "MP Connect Thread Init Port = %d", port); #endif running = false; @@ -2415,7 +2415,7 @@ bool CMPConnectThread::handleAcceptedSocket(ISocket *_sock, unsigned timeoutMs, // not sure how to get here as this is not one of the possible outcomes of above: rd == 0 or rd == sizeof(id) or an exception StringBuffer errMsg("MP Connect Thread: invalid number of connection bytes serialized from "); peerEp.getEndpointHostText(errMsg); - FLLOG(MCoperatorWarning, unknownJob, "%s", errMsg.str()); + FLLOG(MCoperatorWarning, "%s", errMsg.str()); sock->close(); return false; // did not timeout } @@ -2472,7 +2472,7 @@ bool CMPConnectThread::handleAcceptedSocket(ISocket *_sock, unsigned timeoutMs, // JCSMORE, I think _remoteep really must/should match a IP of this local host errMsg.append("MP Connect Thread: invalid remote and/or host ep serialized from "); peerEp.getEndpointHostText(errMsg); - FLLOG(MCoperatorWarning, unknownJob, "%s", errMsg.str()); + FLLOG(MCoperatorWarning, "%s", errMsg.str()); } else if (parent->mpTraceLevel >= MPVerboseMsgThreshold) { @@ -2504,7 +2504,7 @@ bool CMPConnectThread::handleAcceptedSocket(ISocket *_sock, unsigned timeoutMs, #ifdef _TRACE StringBuffer str1; StringBuffer str2; - LOG(MCdebugInfo, unknownJob, "MP Connect Thread: connected to %s",_remoteep.getEndpointHostText(str1).str()); + LOG(MCdebugInfo, "MP Connect Thread: connected to %s",_remoteep.getEndpointHostText(str1).str()); #endif } #ifdef _FULLTRACE @@ -2513,7 +2513,7 @@ bool CMPConnectThread::handleAcceptedSocket(ISocket *_sock, unsigned timeoutMs, } catch (IException *e) { - FLLOG(MCoperatorWarning, unknownJob, e,"MP Connect Thread: Failed to make connection(1)"); + FLLOG(MCoperatorWarning, e,"MP Connect Thread: Failed to make connection(1)"); sock->close(); e->Release(); } @@ -2523,7 +2523,7 @@ bool CMPConnectThread::handleAcceptedSocket(ISocket *_sock, unsigned timeoutMs, int CMPConnectThread::run() { #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: Connect Thread Starting - accept loop"); + LOG(MCdebugInfo, "MP: Connect Thread Starting - accept loop"); #endif while (running) { @@ -2535,7 +2535,7 @@ int CMPConnectThread::run() } catch (IException *e) { - LOG(MCdebugInfo, unknownJob, e,"MP accept failed"); + LOG(MCdebugInfo, e,"MP accept failed"); throw; // error handling TBD } if (sock) @@ -2552,11 +2552,11 @@ int CMPConnectThread::run() else { if (running) - LOG(MCdebugInfo, unknownJob, "MP Connect Thread accept returned NULL"); + LOG(MCdebugInfo, "MP Connect Thread accept returned NULL"); } } #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP Connect Thread Stopping"); + LOG(MCdebugInfo, "MP Connect Thread Stopping"); #endif return 0; } @@ -2668,7 +2668,7 @@ CMPServer::~CMPServer() StringBuffer buf; getReceiveQueueDetails(buf); if (buf.length()) - LOG(MCdebugInfo, unknownJob, "MP: Orphan check\n%s",buf.str()); + LOG(MCdebugInfo, "MP: Orphan check\n%s",buf.str()); #endif _releaseAll(); selecthandler->stop(true); @@ -2746,7 +2746,7 @@ bool CMPServer::recv(CMessageBuffer &mbuf, const SocketEndpoint *ep, mptag_t tag } if (nfy.aborted) { #ifdef _TRACELINKCLOSED - LOG(MCdebugInfo, unknownJob, "CMPserver::recv closed on notify"); + LOG(MCdebugInfo, "CMPserver::recv closed on notify"); PrintStackReport(); #endif IMP_Exception *e=new CMPException(MPERR_link_closed,*nfy.ep); @@ -2832,7 +2832,7 @@ unsigned CMPServer::probe(const SocketEndpoint *ep, mptag_t tag,CTimeMon &tm,Soc } if (nfy.aborted) { #ifdef _TRACELINKCLOSED - LOG(MCdebugInfo, unknownJob, "CMPserver::probe closed on notify"); + LOG(MCdebugInfo, "CMPserver::probe closed on notify"); PrintStackReport(); #endif IMP_Exception *e=new CMPException(MPERR_link_closed,*ep); @@ -2920,7 +2920,7 @@ void CMPServer::notifyClosed(SocketEndpoint &ep, bool trace) if (trace) { StringBuffer url; - LOG(MCdebugInfo, unknownJob, "MP: CMPServer::notifyClosed %s",ep.getEndpointHostText(url).str()); + LOG(MCdebugInfo, "MP: CMPServer::notifyClosed %s",ep.getEndpointHostText(url).str()); PrintStackReport(); } #endif @@ -3621,7 +3621,7 @@ void stopMPServer() { stopLogMsgReceivers(); #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: Stopping MP Server"); + LOG(MCdebugInfo, "MP: Stopping MP Server"); #endif _globalMPServer = globalMPServer; globalMPServer = NULL; @@ -3632,7 +3632,7 @@ void stopMPServer() _globalMPServer->stop(); _globalMPServer->Release(); #ifdef _TRACE - LOG(MCdebugInfo, unknownJob, "MP: Stopped MP Server"); + LOG(MCdebugInfo, "MP: Stopped MP Server"); #endif CriticalBlock block(CGlobalMPServer::sect); initMyNode(0); diff --git a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp index 6413f395132..73b85f33320 100644 --- a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp +++ b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp @@ -2487,7 +2487,7 @@ class IndexDistributeSlaveActivity : public HashDistributeSlaveBase } *lookup; public: - IndexDistributeSlaveActivity(CGraphElementBase *container) : PARENT(container, indexDistribActivityStatistics), lookup(NULL), contextLogger(jhtreeCacheStatistics, thorJob), statsUpdater(jhtreeCacheStatistics, *this, contextLogger) + IndexDistributeSlaveActivity(CGraphElementBase *container) : PARENT(container, indexDistribActivityStatistics), lookup(NULL), contextLogger(jhtreeCacheStatistics), statsUpdater(jhtreeCacheStatistics, *this, contextLogger) { } ~IndexDistributeSlaveActivity() @@ -3422,7 +3422,7 @@ bool CBucket::flush(bool critical) { if (clearHashTable(critical)) { - LOG(MCthorDetailedDebugInfo, thorJob, "Flushed%s bucket %d - %d elements", critical?"(critical)":"", queryBucketNumber(), count); + LOG(MCthorDetailedDebugInfo, "Flushed%s bucket %d - %d elements", critical?"(critical)":"", queryBucketNumber(), count); return true; } } diff --git a/thorlcr/activities/indexread/thindexreadslave.cpp b/thorlcr/activities/indexread/thindexreadslave.cpp index dd6cc9257d5..f276bc2051b 100644 --- a/thorlcr/activities/indexread/thindexreadslave.cpp +++ b/thorlcr/activities/indexread/thindexreadslave.cpp @@ -670,11 +670,11 @@ class CIndexReadSlaveBase : public CSlaveActivity { // Only superfiles required multiple context loggers to track sublevel stats for(unsigned i = 0; i < parts; ++i) - contextLoggers.push_back(new CStatsContextLogger(jhtreeCacheStatistics, thorJob)); + contextLoggers.push_back(new CStatsContextLogger(jhtreeCacheStatistics)); } else { - contextLoggers.push_back(new CStatsContextLogger(jhtreeCacheStatistics, thorJob)); + contextLoggers.push_back(new CStatsContextLogger(jhtreeCacheStatistics)); } } } diff --git a/thorlcr/activities/keyedjoin/thkeyedjoinslave-legacy.cpp b/thorlcr/activities/keyedjoin/thkeyedjoinslave-legacy.cpp index 481abecda01..bd898291a76 100644 --- a/thorlcr/activities/keyedjoin/thkeyedjoinslave-legacy.cpp +++ b/thorlcr/activities/keyedjoin/thkeyedjoinslave-legacy.cpp @@ -1253,7 +1253,7 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem public: IMPLEMENT_IINTERFACE_USING(CSimpleInterface); - CKeyLocalLookup(CKeyedJoinSlave &_owner, const RtlRecord &_keyRecInfo) : owner(_owner), keyRecInfo(_keyRecInfo), indexReadFieldsRow(_owner.indexInputAllocator), contextLogger(jhtreeCacheStatistics, thorJob) + CKeyLocalLookup(CKeyedJoinSlave &_owner, const RtlRecord &_keyRecInfo) : owner(_owner), keyRecInfo(_keyRecInfo), indexReadFieldsRow(_owner.indexInputAllocator), contextLogger(jhtreeCacheStatistics) { tlkManager.setown(owner.keyHasTlk ? createLocalKeyManager(keyRecInfo, nullptr, &contextLogger, owner.helper->hasNewSegmentMonitors(), false) : nullptr); reset(); diff --git a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp index 59997c87a34..d01b86840a9 100644 --- a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp +++ b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp @@ -1030,7 +1030,7 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem { StringBuffer log; getInfo(log).append(": ").append(msg); - LOG(MCthorDetailedDebugInfo, thorJob, "%s", log.str()); + LOG(MCthorDetailedDebugInfo, "%s", log.str()); } virtual StringBuffer &getInfo(StringBuffer &info) const { @@ -1377,7 +1377,7 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem else { for (unsigned i=0; i keyManager{nullptr}; public: - CKeyLookupMergeHandler(CKeyedJoinSlave &_activity) : CKeyLookupLocalBase(_activity), contextLogger(jhtreeCacheStatistics, thorJob) + CKeyLookupMergeHandler(CKeyedJoinSlave &_activity) : CKeyLookupLocalBase(_activity), contextLogger(jhtreeCacheStatistics) { limiter = &activity.lookupThreadLimiter; translators.push_back(nullptr); @@ -1646,7 +1646,7 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem else { for (unsigned i=0; ijhelper->nextRow(); assertex(!row); @@ -1647,7 +1647,7 @@ class CMultiCoreJoinHelper: public CMultiCoreJoinHelperBase } for (unsigned i=0;inumworkers;i++) parent->addWork(NULL,NULL); - LOG(MCthorDetailedDebugInfo, thorJob, "CMultiCoreJoinHelper::cReader exit"); + LOG(MCthorDetailedDebugInfo, "CMultiCoreJoinHelper::cReader exit"); return 0; } } reader; @@ -1671,7 +1671,7 @@ class CMultiCoreJoinHelper: public CMultiCoreJoinHelperBase } int run() { - LOG(MCthorDetailedDebugInfo, thorJob, "CMultiCoreJoinHelper::cWorker started"); + LOG(MCthorDetailedDebugInfo, "CMultiCoreJoinHelper::cWorker started"); Owned rowIf = parent->activity.getRowInterfaces(); Owned allocator = parent->activity.getRowAllocator(rowIf->queryRowMetaData(), (roxiemem::RHFpacked|roxiemem::RHFunique)); @@ -1704,7 +1704,7 @@ class CMultiCoreJoinHelper: public CMultiCoreJoinHelperBase rowWriter->putRow(NULL); // end-of-stream rowWriter->flush(); stopped = true; // NB: will not get past flush(), until all read - LOG(MCthorDetailedDebugInfo, thorJob, "CMultiCoreJoinHelper::cWorker exit"); + LOG(MCthorDetailedDebugInfo, "CMultiCoreJoinHelper::cWorker exit"); return 0; } bool isStopped() const { return stopped; } @@ -1848,7 +1848,7 @@ class CMultiCoreUnorderedJoinHelper: public CMultiCoreJoinHelperBase } int run() { - LOG(MCthorDetailedDebugInfo, thorJob, "CMulticoreUnorderedJoinHelper::cReader started"); + LOG(MCthorDetailedDebugInfo, "CMulticoreUnorderedJoinHelper::cReader started"); try { const void * row = parent->jhelper->nextRow(); assertex(!row); @@ -1857,7 +1857,7 @@ class CMultiCoreUnorderedJoinHelper: public CMultiCoreJoinHelperBase parent->setException(e,"CMulticoreUnorderedJoinHelper::cReader"); } parent->stopWorkers(); - LOG(MCthorDetailedDebugInfo, thorJob, "CMulticoreUnorderedJoinHelper::cReader exit"); + LOG(MCthorDetailedDebugInfo, "CMulticoreUnorderedJoinHelper::cReader exit"); return 0; } } reader; @@ -1876,7 +1876,7 @@ class CMultiCoreUnorderedJoinHelper: public CMultiCoreJoinHelperBase Owned allocator = parent->activity.getRowAllocator(rowIf->queryRowMetaData(), (roxiemem::RHFpacked|roxiemem::RHFunique)); Owned rowWriter = parent->multiWriter->getWriter(); - LOG(MCthorDetailedDebugInfo, thorJob, "CMulticoreUnorderedJoinHelper::cWorker started"); + LOG(MCthorDetailedDebugInfo, "CMulticoreUnorderedJoinHelper::cWorker started"); for (;;) { cWorkItem *work = parent->workqueue.dequeue(); @@ -1897,7 +1897,7 @@ class CMultiCoreUnorderedJoinHelper: public CMultiCoreJoinHelperBase break; } } - LOG(MCthorDetailedDebugInfo, thorJob, "CMulticoreUnorderedJoinHelper::cWorker exit"); + LOG(MCthorDetailedDebugInfo, "CMulticoreUnorderedJoinHelper::cWorker exit"); return 0; } } **workers; diff --git a/thorlcr/activities/soapcall/thsoapcallslave.cpp b/thorlcr/activities/soapcall/thsoapcallslave.cpp index cbb89484c42..b0b81f64e16 100644 --- a/thorlcr/activities/soapcall/thsoapcallslave.cpp +++ b/thorlcr/activities/soapcall/thsoapcallslave.cpp @@ -45,7 +45,7 @@ class CWscRowCallSlaveActivity : public CSlaveActivity, implements IWSCRowProvid public: IMPLEMENT_IINTERFACE_USING(CSlaveActivity); - CWscRowCallSlaveActivity(CGraphElementBase *_container) : CSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics, thorJob), statsUpdater(soapcallStatistics, *this, contextLogger) + CWscRowCallSlaveActivity(CGraphElementBase *_container) : CSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics), statsUpdater(soapcallStatistics, *this, contextLogger) { buildAuthToken(queryJob().queryUserDescriptor(), authToken); setRequireInitData(false); @@ -141,7 +141,7 @@ class SoapDatasetCallSlaveActivity : public CSlaveActivity, implements IWSCRowPr public: IMPLEMENT_IINTERFACE_USING(CSlaveActivity); - SoapDatasetCallSlaveActivity(CGraphElementBase *_container) : CSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics, thorJob), statsUpdater(soapcallStatistics, *this, contextLogger) + SoapDatasetCallSlaveActivity(CGraphElementBase *_container) : CSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics), statsUpdater(soapcallStatistics, *this, contextLogger) { setRequireInitData(false); appendOutputLinked(this); @@ -235,7 +235,7 @@ class SoapRowActionSlaveActivity : public ProcessSlaveActivity, implements IWSCR public: IMPLEMENT_IINTERFACE_USING(PARENT); - SoapRowActionSlaveActivity(CGraphElementBase *_container) : ProcessSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics, thorJob), statsUpdater(soapcallStatistics, *this, contextLogger) + SoapRowActionSlaveActivity(CGraphElementBase *_container) : ProcessSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics), statsUpdater(soapcallStatistics, *this, contextLogger) { setRequireInitData(false); } @@ -294,7 +294,7 @@ class SoapDatasetActionSlaveActivity : public ProcessSlaveActivity, implements I public: IMPLEMENT_IINTERFACE_USING(PARENT); - SoapDatasetActionSlaveActivity(CGraphElementBase *_container) : ProcessSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics, thorJob), statsUpdater(soapcallStatistics, *this, contextLogger) + SoapDatasetActionSlaveActivity(CGraphElementBase *_container) : ProcessSlaveActivity(_container, soapcallActivityStatistics), contextLogger(soapcallStatistics), statsUpdater(soapcallStatistics, *this, contextLogger) { setRequireInitData(false); } diff --git a/thorlcr/activities/thdiskbase.cpp b/thorlcr/activities/thdiskbase.cpp index 0feb326a37c..a2159f3683f 100644 --- a/thorlcr/activities/thdiskbase.cpp +++ b/thorlcr/activities/thdiskbase.cpp @@ -328,7 +328,7 @@ void CWriteMasterBase::publish() { StringBuffer clusterName; fileDesc->getClusterGroupName(clusterIdx, clusterName, &queryNamedGroupStore()); - LOG(MCthorDetailedDebugInfo, thorJob, "Creating blank parts for file '%s', cluster '%s'", fileName.get(), clusterName.str()); + LOG(MCthorDetailedDebugInfo, "Creating blank parts for file '%s', cluster '%s'", fileName.get(), clusterName.str()); unsigned p=0; while (pnumParts()) { diff --git a/thorlcr/graph/thgraph.cpp b/thorlcr/graph/thgraph.cpp index a483ff9ad34..8b06412dc4b 100644 --- a/thorlcr/graph/thgraph.cpp +++ b/thorlcr/graph/thgraph.cpp @@ -1200,12 +1200,12 @@ void traceMemUsage() { StringBuffer memStatsStr; roxiemem::memstats(memStatsStr); - LOG(MCthorDetailedDebugInfo, thorJob, "Roxiemem stats: %s", memStatsStr.str()); + LOG(MCthorDetailedDebugInfo, "Roxiemem stats: %s", memStatsStr.str()); memsize_t heapUsage = getMapInfo("heap"); if (heapUsage) // if 0, assumed to be unavailable { memsize_t rmtotal = roxiemem::getTotalMemoryLimit(); - LOG(MCthorDetailedDebugInfo, thorJob, "Heap usage (excluding Roxiemem) : %" I64F "d bytes", (unsigned __int64)(heapUsage-rmtotal)); + LOG(MCthorDetailedDebugInfo, "Heap usage (excluding Roxiemem) : %" I64F "d bytes", (unsigned __int64)(heapUsage-rmtotal)); } } @@ -1412,7 +1412,7 @@ void CGraphBase::executeSubGraph(size32_t parentExtractSz, const byte *parentExt { StringBuffer s; toXML(&queryXGMML(), s, 2); - MLOG(MCthorDetailedDebugInfo, thorJob, "Running graph [%s] : %s", isGlobal()?"global":"local", s.str()); + MLOG(MCthorDetailedDebugInfo, "Running graph [%s] : %s", isGlobal()?"global":"local", s.str()); } } if (localResults) @@ -2296,7 +2296,7 @@ IThorGraphResults *CGraphBase::createThorGraphResults(unsigned num) CFileUsageEntry * CGraphTempHandler::registerFile(const char *name, graph_id graphId, unsigned usageCount, bool temp, WUFileKind fileKind, StringArray *clusters) { assertex(temp); - LOG(MCdebugProgress, thorJob, "registerTmpFile name=%s, usageCount=%d", name, usageCount); + LOG(MCdebugProgress, "registerTmpFile name=%s, usageCount=%d", name, usageCount); CriticalBlock b(crit); if (tmpFiles.find(name)) throw MakeThorException(TE_FileAlreadyUsedAsTempFile, "File already used as temp file (%s)", name); @@ -2307,7 +2307,7 @@ CFileUsageEntry * CGraphTempHandler::registerFile(const char *name, graph_id gra void CGraphTempHandler::deregisterFile(const char *name, bool kept) { - LOG(MCdebugProgress, thorJob, "deregisterTmpFile name=%s", name); + LOG(MCdebugProgress, "deregisterTmpFile name=%s", name); CriticalBlock b(crit); CFileUsageEntry *fileUsage = tmpFiles.find(name); if (!fileUsage) @@ -2324,9 +2324,9 @@ void CGraphTempHandler::deregisterFile(const char *name, bool kept) try { if (!removeTemp(name)) - LOG(MCwarning, thorJob, "Failed to delete tmp file : %s (not found)", name); + LOG(MCwarning, "Failed to delete tmp file : %s (not found)", name); } - catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, thorJob, e, s.append(name).str()); } + catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, e, s.append(name).str()); } } else fileUsage->decUsage(); @@ -2343,9 +2343,9 @@ void CGraphTempHandler::clearTemps() try { if (!removeTemp(tmpname)) - LOG(MCwarning, thorJob, "Failed to delete tmp file : %s (not found)", tmpname); + LOG(MCwarning, "Failed to delete tmp file : %s (not found)", tmpname); } - catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, thorJob, e, s.append(tmpname).str()); } + catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, e, s.append(tmpname).str()); } } iter.clear(); tmpFiles.kill(); @@ -2778,7 +2778,7 @@ CActivityBase &CJobBase::queryChannelActivity(unsigned c, graph_id gid, activity void CJobBase::startJob() { - LOG(MCdebugProgress, thorJob, "New Graph started : %s", graphName.get()); + LOG(MCdebugProgress, "New Graph started : %s", graphName.get()); perfmonhook.setown(createThorMemStatsPerfMonHook(*this, getOptInt(THOROPT_MAX_KERNLOG, 3))); setPerformanceMonitorHook(perfmonhook); PrintMemoryStatusLog(); @@ -2822,7 +2822,7 @@ void CJobBase::endJob() jobEnded = true; setPerformanceMonitorHook(nullptr); - LOG(MCdebugProgress, thorJob, "Job ended : %s", graphName.get()); + LOG(MCdebugProgress, "Job ended : %s", graphName.get()); clearKeyStoreCache(true); PrintMemoryStatusLog(); @@ -3015,7 +3015,7 @@ mptag_t CJobChannel::deserializeMPTag(MemoryBuffer &mb) deserializeMPtag(mb, tag); if (TAG_NULL != tag) { - LOG(MCthorDetailedDebugInfo, thorJob, "deserializeMPTag: tag = %d", (int)tag); + LOG(MCthorDetailedDebugInfo, "deserializeMPTag: tag = %d", (int)tag); jobComm->flush(tag); } return tag; @@ -3054,7 +3054,7 @@ void CJobChannel::clean() if (!REJECTLOG(MCthorDetailedDebugInfo)) { queryRowManager()->reportMemoryUsage(false); - LOG(MCthorDetailedDebugInfo, thorJob, "CJobBase resetting memory manager"); + LOG(MCthorDetailedDebugInfo, "CJobBase resetting memory manager"); } if (graphExecutor) diff --git a/thorlcr/graph/thgraphmaster.cpp b/thorlcr/graph/thgraphmaster.cpp index 7496b4e516b..3d4c37507ae 100644 --- a/thorlcr/graph/thgraphmaster.cpp +++ b/thorlcr/graph/thgraphmaster.cpp @@ -78,7 +78,7 @@ class CFatalHandler : public CTimeoutTrigger, implements IFatalHandler virtual bool action() override { StringBuffer s("FAILED TO RECOVER FROM EXCEPTION, STOPPING THOR"); - FLLOG(MCoperatorWarning, thorJob, exception, s.str()); + FLLOG(MCoperatorWarning, exception, s.str()); Owned jobManager = getJobManager(); if (jobManager) { @@ -298,7 +298,7 @@ void CSlaveMessageHandler::threadmain() } case smt_getPhysicalName: { - LOG(MCdebugProgress, thorJob, "getPhysicalName called from node %d", sender-1); + LOG(MCdebugProgress, "getPhysicalName called from node %d", sender-1); StringAttr logicalName; unsigned partNo; bool create; @@ -317,7 +317,7 @@ void CSlaveMessageHandler::threadmain() } case smt_getFileOffset: { - LOG(MCdebugProgress, thorJob, "getFileOffset called from node %d", sender-1); + LOG(MCdebugProgress, "getFileOffset called from node %d", sender-1); StringAttr logicalName; unsigned partNo; msg.read(logicalName); @@ -330,7 +330,7 @@ void CSlaveMessageHandler::threadmain() } case smt_actMsg: { - LOG(MCdebugProgress, thorJob, "smt_actMsg called from node %d", sender-1); + LOG(MCdebugProgress, "smt_actMsg called from node %d", sender-1); graph_id gid; msg.read(gid); activity_id id; @@ -348,7 +348,7 @@ void CSlaveMessageHandler::threadmain() { unsigned slave; msg.read(slave); - LOG(MCdebugProgress, thorJob, "smt_getresult called from slave %d", slave); + LOG(MCdebugProgress, "smt_getresult called from slave %d", slave); graph_id gid; msg.read(gid); activity_id ownerId; @@ -1001,7 +1001,7 @@ class CThorCodeContextMaster : public CThorCodeContextBase return getWorkUnitResult(workunit, name, sequence); } #define PROTECTED_GETRESULT(STEPNAME, SEQUENCE, KIND, KINDTEXT, ACTION) \ - LOG(MCdebugProgress, thorJob, "getResult%s(%s,%d)", KIND, STEPNAME?STEPNAME:"", SEQUENCE); \ + LOG(MCdebugProgress, "getResult%s(%s,%d)", KIND, STEPNAME?STEPNAME:"", SEQUENCE); \ Owned r = getResultForGet(STEPNAME, SEQUENCE); \ try \ { \ @@ -1266,7 +1266,7 @@ class CThorCodeContextMaster : public CThorCodeContextBase { try { - LOG(MCdebugProgress, thorJob, "getExternalResultRaw %s", stepname); + LOG(MCdebugProgress, "getExternalResultRaw %s", stepname); Owned r = getExternalResult(wuid, stepname, sequence); return r->getResultHash(); @@ -1308,7 +1308,7 @@ class CThorCodeContextMaster : public CThorCodeContextBase tgt = NULL; try { - LOG(MCdebugProgress, thorJob, "getExternalResultRaw %s", stepname); + LOG(MCdebugProgress, "getExternalResultRaw %s", stepname); Variable2IDataVal result(&tlen, &tgt); Owned r = getExternalResult(wuid, stepname, sequence); @@ -1586,7 +1586,7 @@ mptag_t CJobMaster::allocateMPTag() { mptag_t tag = allocateClusterMPTag(); queryJobChannel(0).queryJobComm().flush(tag); - LOG(MCthorDetailedDebugInfo, thorJob, "allocateMPTag: tag = %d", (int)tag); + LOG(MCthorDetailedDebugInfo, "allocateMPTag: tag = %d", (int)tag); return tag; } @@ -1595,7 +1595,7 @@ void CJobMaster::freeMPTag(mptag_t tag) if (TAG_NULL != tag) { freeClusterMPTag(tag); - LOG(MCthorDetailedDebugInfo, thorJob, "freeMPTag: tag = %d", (int)tag); + LOG(MCthorDetailedDebugInfo, "freeMPTag: tag = %d", (int)tag); queryJobChannel(0).queryJobComm().flush(tag); } } @@ -1869,7 +1869,7 @@ bool CJobMaster::go() Owned factory = getWorkUnitFactory(); if (factory->isAborting(wu.queryWuid())) { - LOG(MCwarning, thorJob, "ABORT detected from user"); + LOG(MCwarning, "ABORT detected from user"); unsigned code = TE_WorkUnitAborting; // default if (job.getOptBool("dumpInfoOnUserAbort", false)) @@ -2089,13 +2089,13 @@ bool CJobMaster::fireException(IException *e) { case tea_warning: { - LOG(MCwarning, thorJob, e); + LOG(MCwarning, e); reportExceptionToWorkunitCheckIgnore(*workunit, e); break; } default: { - LOG(MCerror, thorJob, e); + LOG(MCerror, e); queryJobManager().replyException(*this, e); fatalHandler->inform(LINK(e)); try { abort(e); } @@ -2341,13 +2341,13 @@ bool CMasterGraph::fireException(IException *e) { case tea_warning: { - LOG(MCwarning, thorJob, e); + LOG(MCwarning, e); reportExceptionToWorkunitCheckIgnore(job.queryWorkUnit(), e); break; } default: { - LOG(MCerror, thorJob, e); + LOG(MCerror, e); if (NULL != fatalHandler) fatalHandler->inform(LINK(e)); if (owner) diff --git a/thorlcr/graph/thgraphslave.cpp b/thorlcr/graph/thgraphslave.cpp index c510d59960b..991efa73f8a 100644 --- a/thorlcr/graph/thgraphslave.cpp +++ b/thorlcr/graph/thgraphslave.cpp @@ -1804,7 +1804,7 @@ void CJobSlave::reportGraphEnd(graph_id gid) getSocketStatistics(stats); StringBuffer s; getSocketStatisticsString(stats,s); - MLOG(MCthorDetailedDebugInfo, thorJob, "Graph[%" GIDPF "u] - Socket statistics : %s\n", gid, s.str()); + MLOG(MCthorDetailedDebugInfo, "Graph[%" GIDPF "u] - Socket statistics : %s\n", gid, s.str()); } resetSocketStatistics(); } @@ -1850,7 +1850,7 @@ mptag_t CJobSlave::deserializeMPTag(MemoryBuffer &mb) deserializeMPtag(mb, tag); if (TAG_NULL != tag) { - LOG(MCthorDetailedDebugInfo, thorJob, "CJobSlave::deserializeMPTag: tag = %d", (int)tag); + LOG(MCthorDetailedDebugInfo, "CJobSlave::deserializeMPTag: tag = %d", (int)tag); for (unsigned c=0; cmarkdead = true; - LOG(MCdebugProgress, thorJob, "Watchdog : Marking Machine as Down! [%s]", epstr.str()); + LOG(MCdebugProgress, "Watchdog : Marking Machine as Down! [%s]", epstr.str()); //removeSlave(mstate->ep); // more TBD } } @@ -202,7 +202,7 @@ void CMasterWatchdog::stopReading() void CMasterWatchdog::threadmain() { - LOG(MCdebugProgress, thorJob, "Started watchdog"); + LOG(MCdebugProgress, "Started watchdog"); unsigned lastbeat=msTick(); unsigned lastcheck=lastbeat; @@ -234,7 +234,7 @@ void CMasterWatchdog::threadmain() { StringBuffer epstr; hb.sender.getEndpointHostText(epstr); - LOG(MCdebugProgress, thorJob, "Watchdog : Unknown Machine! [%s]", epstr.str()); //TBD + LOG(MCdebugProgress, "Watchdog : Unknown Machine! [%s]", epstr.str()); //TBD } } unsigned now=msTick(); @@ -253,7 +253,7 @@ void CMasterWatchdog::threadmain() { if (MPERR_link_closed != e->errorCode()) { - FLLOG(MCexception(e), thorJob, e,"Watchdog Server Exception"); + FLLOG(MCexception(e), e,"Watchdog Server Exception"); e->Release(); } else @@ -266,7 +266,7 @@ void CMasterWatchdog::threadmain() } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e,"Watchdog Server Exception"); + FLLOG(MCexception(e), e,"Watchdog Server Exception"); e->Release(); // NB: it is important to continue with master watchdog, to continue to consume packets from workers } diff --git a/thorlcr/master/thactivitymaster.cpp b/thorlcr/master/thactivitymaster.cpp index b7ca5b248f8..82ca2d647a9 100644 --- a/thorlcr/master/thactivitymaster.cpp +++ b/thorlcr/master/thactivitymaster.cpp @@ -701,7 +701,7 @@ void checkFormatCrc(CActivityBase *activity, IDistributedFile *file, unsigned ex Owned e = MakeActivityException(activity, TE_FormatCrcMismatch, "%s: Layout does not match published layout. %s", kindStr.str(), fileStr.str()); if (index && !f->queryAttributes().hasProp("_record_layout")) // Cannot verify if _true_ crc mismatch if soft layout missing anymore - LOG(MCwarning, thorJob, e); + LOG(MCwarning, e); else { if (activity->queryContainer().queryJob().getWorkUnitValueBool("skipFileFormatCrcCheck", false)) diff --git a/thorlcr/master/thdemonserver.cpp b/thorlcr/master/thdemonserver.cpp index 5de19dced0b..b46e15eac3b 100644 --- a/thorlcr/master/thdemonserver.cpp +++ b/thorlcr/master/thdemonserver.cpp @@ -75,7 +75,7 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer catch (IException *e) { StringBuffer s; - LOG(MCwarning, thorJob, "Failed to update progress information: %s", e->errorMessage(s).str()); + LOG(MCwarning, "Failed to update progress information: %s", e->errorMessage(s).str()); e->Release(); } } @@ -103,7 +103,7 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer const cost_type totalCost = workunitCost + sgCost + costDiskAccess; if (costLimit>0 && totalCost > costLimit) { - LOG(MCwarning, thorJob, "ABORT job cost exceeds limit"); + LOG(MCwarning, "ABORT job cost exceeds limit"); graph.fireException(MakeThorException(TE_CostExceeded, "Job cost exceeds limit")); } } @@ -160,7 +160,7 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer catch (IException *E) { StringBuffer s; - LOG(MCwarning, thorJob, "Failed to update progress information: %s", E->errorMessage(s).str()); + LOG(MCwarning, "Failed to update progress information: %s", E->errorMessage(s).str()); E->Release(); } } @@ -192,7 +192,7 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer catch (IException *e) { StringBuffer s; - LOG(MCwarning, thorJob, "Failed to update progress information: %s", e->errorMessage(s).str()); + LOG(MCwarning, "Failed to update progress information: %s", e->errorMessage(s).str()); e->Release(); } } @@ -213,7 +213,7 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer if (0 == activeGraphs.ordinality()) { StringBuffer urlStr; - LOG(MCdebugProgress, thorJob, "heartbeat packet received with no active graphs"); + LOG(MCdebugProgress, "heartbeat packet received with no active graphs"); return; } size32_t compressedProgressSz = progressMb.remaining(); @@ -231,12 +231,12 @@ class DeMonServer : public CSimpleInterface, implements IDeMonServer ForEachItemIn(g, activeGraphs) if (activeGraphs.item(g).queryGraphId() == graphId) graph = (CMasterGraph *)&activeGraphs.item(g); if (!graph) { - LOG(MCdebugProgress, thorJob, "heartbeat received from unknown graph %" GIDPF "d", graphId); + LOG(MCdebugProgress, "heartbeat received from unknown graph %" GIDPF "d", graphId); break; } if (!graph->deserializeStats(slave, uncompressedMb)) { - LOG(MCdebugProgress, thorJob, "heartbeat error in graph %" GIDPF "d", graphId); + LOG(MCdebugProgress, "heartbeat error in graph %" GIDPF "d", graphId); break; } } diff --git a/thorlcr/master/thgraphmanager.cpp b/thorlcr/master/thgraphmanager.cpp index 4cf6300e651..16ef33f510e 100644 --- a/thorlcr/master/thgraphmanager.cpp +++ b/thorlcr/master/thgraphmanager.cpp @@ -265,7 +265,7 @@ class CJobManager : public CSimpleInterface, implements IJobManager, implements } else if (strncmp(command,"quit", 4) == 0) { - LOG(MCwarning, thorJob, "ABORT detected from user during debug session"); + LOG(MCwarning, "ABORT detected from user during debug session"); Owned e = MakeThorException(TE_WorkUnitAborting, "User signalled abort during debug session"); job->fireException(e); response.appendf(""); @@ -384,7 +384,7 @@ void CJobManager::stop() { if (!stopped) { - LOG(MCdebugProgress, thorJob, "Stopping jobManager"); + LOG(MCdebugProgress, "Stopping jobManager"); stopped = true; if (jobq) { @@ -578,7 +578,7 @@ bool CJobManager::execute(IConstWorkUnit *workunit, const char *wuid, const char void CJobManager::run() { - LOG(MCdebugProgress, thorJob, "Listening for graph"); + LOG(MCdebugProgress, "Listening for graph"); setWuid(NULL); #ifndef _CONTAINERIZED @@ -671,7 +671,7 @@ void CJobManager::run() if (exclusiveLockName.length()) { if (globals->getPropBool("@multiThorPriorityLock")) - FLLOG(MCoperatorWarning, thorJob, "multiThorPriorityLock cannot be used in conjunction with multiThorExclusionLockName"); + FLLOG(MCoperatorWarning, "multiThorPriorityLock cannot be used in conjunction with multiThorExclusionLockName"); else { PROGLOG("Multi-Thor exclusive lock defined: %s", exclusiveLockName.str()); @@ -836,7 +836,7 @@ void CJobManager::run() } catch (IException *e) { - FLLOG(MCoperatorWarning, thorJob, e, "CJobManager::run"); + FLLOG(MCoperatorWarning, e, "CJobManager::run"); continue; } Owned factory; @@ -887,7 +887,7 @@ bool CJobManager::doit(IConstWorkUnit *workunit, const char *graphName, const So StringAttr wuid(workunit->queryWuid()); StringAttr user(workunit->queryUser()); - LOG(MCdebugInfo, thorJob, "Processing wuid=%s, graph=%s from agent: %s", wuid.str(), graphName, agentep.getEndpointHostText(s).str()); + LOG(MCdebugInfo, "Processing wuid=%s, graph=%s from agent: %s", wuid.str(), graphName, agentep.getEndpointHostText(s).str()); LOG(MCauditInfo,",Progress,Thor,Start,%s,%s,%s,%s,%s,%s", queryServerStatus().queryProperties()->queryProp("@thorname"), wuid.str(), @@ -933,12 +933,12 @@ void CJobManager::setWuid(const char *wuid, const char *cluster) } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e, "WARNING: Failed to set wuid in SDS:"); + FLLOG(MCexception(e), e, "WARNING: Failed to set wuid in SDS:"); e->Release(); } catch (CATCHALL) { - FLLOG(MCerror, thorJob, "WARNING: Failed to set wuid in SDS: Unknown error"); + FLLOG(MCerror, "WARNING: Failed to set wuid in SDS: Unknown error"); } } @@ -1080,7 +1080,7 @@ bool CJobManager::executeGraph(IConstWorkUnit &workunit, const char *graphName, } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e, "Failed to write query dll - ignoring!"); + FLLOG(MCexception(e), e, "Failed to write query dll - ignoring!"); e->Release(); } sendSo = getExpertOptBool("dllsToSlaves", true); @@ -1200,7 +1200,7 @@ void abortThor(IException *e, unsigned errCode, bool abortCurrentJob) } EXCLOG(e,"abortThor"); } - LOG(MCdebugProgress, thorJob, "abortThor called"); + LOG(MCdebugProgress, "abortThor called"); if (jM) jM->stop(); if (thorQueue) @@ -1212,7 +1212,7 @@ void abortThor(IException *e, unsigned errCode, bool abortCurrentJob) if (2 > aborting && abortCurrentJob) { aborting = 2; - LOG(MCdebugProgress, thorJob, "aborting any current active job"); + LOG(MCdebugProgress, "aborting any current active job"); if (jM) { if (!e) @@ -1224,7 +1224,7 @@ void abortThor(IException *e, unsigned errCode, bool abortCurrentJob) } if (errCode == TEC_Clean) { - LOG(MCdebugProgress, thorJob, "Removing sentinel upon normal shutdown"); + LOG(MCdebugProgress, "Removing sentinel upon normal shutdown"); Owned sentinelFile = createSentinelTarget(); removeSentinelFile(sentinelFile); } @@ -1508,7 +1508,7 @@ void thorMain(ILogMsgHandler *logHandler, const char *wuid, const char *graphNam } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e,"ThorMaster"); + FLLOG(MCexception(e), e,"ThorMaster"); e->Release(); } if (multiThorMemoryThreshold) diff --git a/thorlcr/master/thmastermain.cpp b/thorlcr/master/thmastermain.cpp index 15799a5c593..0bc45fdac10 100644 --- a/thorlcr/master/thmastermain.cpp +++ b/thorlcr/master/thmastermain.cpp @@ -555,7 +555,7 @@ bool checkClusterRelicateDAFS(IGroup &grp) ep.port = 0; StringBuffer ips; ep.getHostText(ips); - FLLOG(MCoperatorError, thorJob, "VALIDATE FAILED(%d) %s : %s",failedcodes.item(i),ips.str(),failedmessages.item(i)); + FLLOG(MCoperatorError, "VALIDATE FAILED(%d) %s : %s",failedcodes.item(i),ips.str(),failedmessages.item(i)); } PROGLOG("Cluster replicate nodes check completed in %dms",msTick()-start); return (failures.ordinality()==0); @@ -578,7 +578,7 @@ bool ControlHandler(ahType type) { if (firstCtrlC) { - LOG(MCdebugProgress, thorJob, "CTRL-C detected"); + LOG(MCdebugProgress, "CTRL-C detected"); firstCtrlC = false; { Owned registry = CRegistryServer::getRegistryServer(); @@ -589,7 +589,7 @@ bool ControlHandler(ahType type) } else { - LOG(MCdebugProgress, thorJob, "2nd CTRL-C detected - terminating process"); + LOG(MCdebugProgress, "2nd CTRL-C detected - terminating process"); if (auditStartLogged) { @@ -606,7 +606,7 @@ bool ControlHandler(ahType type) // ahTerminate else { - LOG(MCdebugProgress, thorJob, "SIGTERM detected, shutting down"); + LOG(MCdebugProgress, "SIGTERM detected, shutting down"); Owned registry = CRegistryServer::getRegistryServer(); if (registry) registry->stop(); @@ -652,7 +652,7 @@ int main( int argc, const char *argv[] ) StringBuffer daliServer; if (!globals->getProp("@daliServers", daliServer)) { - LOG(MCerror, thorJob, "No Dali server list specified in THOR.XML (daliServers=iport,iport...)\n"); + LOG(MCerror, "No Dali server list specified in THOR.XML (daliServers=iport,iport...)\n"); return 0; // no recycle } @@ -711,14 +711,14 @@ int main( int argc, const char *argv[] ) queryLogMsgManager()->removeMonitor(queryStderrLogMsgHandler()); #endif - LOG(MCdebugProgress, thorJob, "Opened log file %s", logUrl.str()); + LOG(MCdebugProgress, "Opened log file %s", logUrl.str()); } #else setupContainerizedLogMsgHandler(); logHandler = queryStderrLogMsgHandler(); logUrl.set("stderr"); #endif - LOG(MCdebugProgress, thorJob, "Build %s", hpccBuildInfo.buildTag); + LOG(MCdebugProgress, "Build %s", hpccBuildInfo.buildTag); Owned serverGroup = createIGroupRetry(daliServer.str(), DALI_SERVER_PORT); @@ -727,7 +727,7 @@ int main( int argc, const char *argv[] ) { try { - LOG(MCdebugProgress, thorJob, "calling initClientProcess %d", thorEp.port); + LOG(MCdebugProgress, "calling initClientProcess %d", thorEp.port); initClientProcess(serverGroup, DCR_ThorMaster, thorEp.port, nullptr, nullptr, MP_WAIT_FOREVER, true); if (0 == thorEp.port) thorEp.port = queryMyNode()->endpoint().port; @@ -741,11 +741,11 @@ int main( int argc, const char *argv[] ) { if ((e->errorCode()!=JSOCKERR_port_in_use)) throw; - FLLOG(MCexception(e), thorJob, e,"InitClientProcess"); + FLLOG(MCexception(e), e,"InitClientProcess"); if (retry++>10) throw; e->Release(); - LOG(MCdebugProgress, thorJob, "Retrying"); + LOG(MCdebugProgress, "Retrying"); Sleep(retry*2000); } } @@ -949,7 +949,7 @@ int main( int argc, const char *argv[] ) } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e,"ThorMaster"); + FLLOG(MCexception(e), e,"ThorMaster"); e->Release(); return -1; } @@ -994,8 +994,8 @@ int main( int argc, const char *argv[] ) thorJob.setJobID(thorJobId); setDefaultJobId(thorJobId); StringBuffer thorEpStr; - LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); - LOG(MCdebugProgress, thorJob, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); + LOG(MCdebugProgress, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); + LOG(MCdebugProgress, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); unsigned numWorkersPerPod = 1; if (!globals->hasProp("@numWorkers")) @@ -1040,8 +1040,8 @@ int main( int argc, const char *argv[] ) else { StringBuffer thorEpStr; - LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); - LOG(MCdebugProgress, thorJob, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); + LOG(MCdebugProgress, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); + LOG(MCdebugProgress, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); unsigned localThorPortInc = globals->getPropInt("@localThorPortInc", DEFAULT_SLAVEPORTINC); unsigned slaveBasePort = globals->getPropInt("@slaveport", DEFAULT_THORSLAVEPORT); Owned rawGroup = getClusterNodeGroup(thorname, "ThorCluster"); @@ -1064,7 +1064,7 @@ int main( int argc, const char *argv[] ) // bare-metal - check health of dafilesrv's on the Thor cluster. if (globals->getPropBool("@replicateOutputs")&&globals->getPropBool("@validateDAFS",true)&&!checkClusterRelicateDAFS(queryNodeGroup())) { - FLLOG(MCoperatorError, thorJob, "ERROR: Validate failure(s) detected, exiting Thor"); + FLLOG(MCoperatorError, "ERROR: Validate failure(s) detected, exiting Thor"); return globals->getPropBool("@validateDAFSretCode"); // default is no recycle! } } @@ -1136,11 +1136,11 @@ int main( int argc, const char *argv[] ) // NB: workunit/graphName only set in one-shot mode (if isCloud()) thorMain(logHandler, workunit, graphName); LOG(MCauditInfo, ",Progress,Thor,Terminate,%s,%s,%s",thorname,nodeGroup.str(),queueName.str()); - LOG(MCdebugProgress, thorJob, "ThorMaster terminated OK"); + LOG(MCdebugProgress, "ThorMaster terminated OK"); } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e,"ThorMaster"); + FLLOG(MCexception(e), e,"ThorMaster"); exception.setown(e); } if (isContainerized()) diff --git a/thorlcr/mfilemanager/thmfilemanager.cpp b/thorlcr/mfilemanager/thmfilemanager.cpp index b26528dce45..f16549d4769 100644 --- a/thorlcr/mfilemanager/thmfilemanager.cpp +++ b/thorlcr/mfilemanager/thmfilemanager.cpp @@ -388,7 +388,7 @@ class CFileManager : public CSimpleInterface, implements IThorFileManager bool extend = 0 != (helperFlags&TDWextend); bool jobTemp = 0 != (helperFlags&TDXjobtemp); - LOG(MCdebugInfo, thorJob, "createLogicalFile ( %s )", logicalName); + LOG(MCdebugInfo, "createLogicalFile ( %s )", logicalName); Owned efile; CDfsLogicalFileName dlfn; diff --git a/thorlcr/msort/tsortl.cpp b/thorlcr/msort/tsortl.cpp index 00d33a9aeb2..75a70955103 100644 --- a/thorlcr/msort/tsortl.cpp +++ b/thorlcr/msort/tsortl.cpp @@ -119,11 +119,11 @@ class CSocketRowStream: public CSimpleInterface, implements IRowStream if (dsz.eos()) { inbuf.clear(); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowStream.nextRow recv (%d,%x)",id,(unsigned)(memsize_t)socket.get()); + LOG(MCthorDetailedDebugInfo, "CSocketRowStream.nextRow recv (%d,%x)",id,(unsigned)(memsize_t)socket.get()); #endif size32_t sz = socket->receive_block_size(); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowStream.nextRow(%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),sz); + LOG(MCthorDetailedDebugInfo, "CSocketRowStream.nextRow(%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),sz); #endif if (sz==0) { // eof so terminate (no need to confirm) @@ -135,7 +135,7 @@ class CSocketRowStream: public CSimpleInterface, implements IRowStream socket->receive_block(buf,sz); assertex(!dsz.eos()); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowStream.nextRow got (%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),sz); + LOG(MCthorDetailedDebugInfo, "CSocketRowStream.nextRow got (%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),sz); #endif } RtlDynamicRowBuilder rowBuilder(allocator); @@ -151,12 +151,12 @@ class CSocketRowStream: public CSimpleInterface, implements IRowStream stopped = true; try { #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowStream.stop(%x)",(unsigned)(memsize_t)socket.get()); + LOG(MCthorDetailedDebugInfo, "CSocketRowStream.stop(%x)",(unsigned)(memsize_t)socket.get()); #endif bool eof = true; socket->write(&eof,sizeof(eof)); // confirm stop #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowStream.stopped(%x)",(unsigned)(memsize_t)socket.get()); + LOG(MCthorDetailedDebugInfo, "CSocketRowStream.stopped(%x)",(unsigned)(memsize_t)socket.get()); #endif } catch (IException *e) { @@ -203,7 +203,7 @@ class CSocketRowWriter: public CSimpleInterface, implements ISocketRowWriter preallocated = bufsize+initSize; #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowWriter(%d,%x) preallocated = %d",id,(unsigned)(memsize_t)socket.get(),preallocated); + LOG(MCthorDetailedDebugInfo, "CSocketRowWriter(%d,%x) preallocated = %d",id,(unsigned)(memsize_t)socket.get(),preallocated); #endif } @@ -224,11 +224,11 @@ class CSocketRowWriter: public CSimpleInterface, implements ISocketRowWriter flush(); try { #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowWriter.stop(%x)",(unsigned)(memsize_t)socket.get()); + LOG(MCthorDetailedDebugInfo, "CSocketRowWriter.stop(%x)",(unsigned)(memsize_t)socket.get()); #endif socket->send_block(NULL,0); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowWriter.stopped(%x)",(unsigned)(memsize_t)socket.get()); + LOG(MCthorDetailedDebugInfo, "CSocketRowWriter.stopped(%x)",(unsigned)(memsize_t)socket.get()); #endif } catch (IJSOCK_Exception *e) { // already gone! @@ -257,11 +257,11 @@ class CSocketRowWriter: public CSimpleInterface, implements ISocketRowWriter { size32_t l = outbuf.length(); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowWriter.flush(%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),l); + LOG(MCthorDetailedDebugInfo, "CSocketRowWriter.flush(%d,%x,%d)",id,(unsigned)(memsize_t)socket.get(),l); #endif if (l) { if (!socket->send_block(outbuf.bufferBase(),l)) { - LOG(MCthorDetailedDebugInfo, thorJob, "CSocketRowWriter remote stop"); + LOG(MCthorDetailedDebugInfo, "CSocketRowWriter remote stop"); stopped = true; } pos += l; @@ -289,7 +289,7 @@ IRowStream *ConnectMergeRead(unsigned id, IThorRowInterfaces *rowif,SocketEndpoi #ifdef _FULL_TRACE StringBuffer s; nodeaddr.getEndpointHostText(s); - LOG(MCthorDetailedDebugInfo, thorJob, "ConnectMergeRead(%d,%s,%x,%" RCPF "d,%" RCPF "u)",id,s.str(),(unsigned)(memsize_t)socket.get(),startrec,numrecs); + LOG(MCthorDetailedDebugInfo, "ConnectMergeRead(%d,%s,%x,%" RCPF "d,%" RCPF "u)",id,s.str(),(unsigned)(memsize_t)socket.get(),startrec,numrecs); #endif socket->write(&hdr,sizeof(hdr)); return new CSocketRowStream(id,rowif->queryRowAllocator(),rowif->queryRowDeserializer(),socket); @@ -337,7 +337,7 @@ ISocketRowWriter *ConnectMergeWrite(IThorRowInterfaces *rowif,ISocket *socket,si #ifdef _FULL_TRACE char name[100]; int port = socket->peer_name(name,sizeof(name)); - LOG(MCthorDetailedDebugInfo, thorJob, "ConnectMergeWrite(%d,%s:%d,%x,%" RCPF "d,%" RCPF "u)",hdr.id,name,port,(unsigned)(memsize_t)socket,startrec,numrecs); + LOG(MCthorDetailedDebugInfo, "ConnectMergeWrite(%d,%s:%d,%x,%" RCPF "d,%" RCPF "u)",hdr.id,name,port,(unsigned)(memsize_t)socket,startrec,numrecs); #endif return new CSocketRowWriter(hdr.id,rowif,socket,bufsize); } diff --git a/thorlcr/msort/tsortmp.cpp b/thorlcr/msort/tsortmp.cpp index 957ec55b238..5e6c52d53c3 100644 --- a/thorlcr/msort/tsortmp.cpp +++ b/thorlcr/msort/tsortmp.cpp @@ -290,7 +290,7 @@ bool SortSlaveMP::marshall(ISortSlaveMP &slave, ICommunicator* comm, mptag_t tag rank_t sender; comm->recv(mb,0,tag,&sender); // NB only recv from master if (mb.length()==0) { - LOG(MCthorDetailedDebugInfo, thorJob, "Stopping SortSlaveMP::marshall"); + LOG(MCthorDetailedDebugInfo, "Stopping SortSlaveMP::marshall"); return false; } byte fn; @@ -301,7 +301,7 @@ bool SortSlaveMP::marshall(ISortSlaveMP &slave, ICommunicator* comm, mptag_t tag mbout.append(okout); #ifdef FULLTRACE StringBuffer tmp1; - LOG(MCthorDetailedDebugInfo, thorJob, ">SortSlaveMP::marshall(%d) got %d from %s tag %d replytag %d",(int)fn, mb.length(), mb.getSender().getEndpointHostText(tmp1).str(),tag,mb.getReplyTag()); + LOG(MCthorDetailedDebugInfo, ">SortSlaveMP::marshall(%d) got %d from %s tag %d replytag %d",(int)fn, mb.length(), mb.getSender().getEndpointHostText(tmp1).str(),tag,mb.getReplyTag()); #endif bool replydone = false; Owned err; @@ -531,7 +531,7 @@ bool SortSlaveMP::marshall(ISortSlaveMP &slave, ICommunicator* comm, mptag_t tag if (!replydone) { #ifdef FULLTRACE StringBuffer tmp1; - LOG(MCthorDetailedDebugInfo, thorJob, "reply(mbout); } diff --git a/thorlcr/msort/tsorts.cpp b/thorlcr/msort/tsorts.cpp index 41d8b798002..f6af0ff1ca7 100644 --- a/thorlcr/msort/tsorts.cpp +++ b/thorlcr/msort/tsorts.cpp @@ -106,7 +106,7 @@ class CWriteIntercept : public CSimpleInterface { StringBuffer err; err.append("Cannot create ").append(idxFile->queryFilename()); - LOG(MCerror, thorJob, "%s", err.str()); + LOG(MCerror, "%s", err.str()); throw MakeActivityException(&activity, -1, "%s", err.str()); } idxFileStream.setown(createBufferedIOStream(idxFileIO,0x100000)); @@ -1155,10 +1155,10 @@ class CThorSorter : public CSimpleInterface, implements IThorSorter, implements startmergesem.signal(); ActPrintLog(activity, "StartMiniSort output started"); traceWait("finishedmergesem(2)",finishedmergesem); - LOG(MCthorDetailedDebugInfo, thorJob, "StartMiniSort output done"); + LOG(MCthorDetailedDebugInfo, "StartMiniSort output done"); merger.clear(); intercept.clear(); - LOG(MCthorDetailedDebugInfo, thorJob, "StartMiniSort exit"); + LOG(MCthorDetailedDebugInfo, "StartMiniSort exit"); } virtual void Close() { diff --git a/thorlcr/msort/tsorts1.cpp b/thorlcr/msort/tsorts1.cpp index a0810adae20..fccf23e6dbb 100644 --- a/thorlcr/msort/tsorts1.cpp +++ b/thorlcr/msort/tsorts1.cpp @@ -60,7 +60,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream endpoint = targetep; char url[100]; targetep.getEndpointHostText(url,sizeof(url)); - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: Stream(%u) %s, pos=%" RCPF "d len=%" RCPF "u",streamno,url,startrec,numrecs); + LOG(MCthorDetailedDebugInfo, "SORT Merge READ: Stream(%u) %s, pos=%" RCPF "d len=%" RCPF "u",streamno,url,startrec,numrecs); SocketEndpoint mergeep = targetep; mergeep.port+=SOCKETSERVERINC; @@ -86,7 +86,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream stream = ConnectMergeRead(streamno,rowif,mergeep,startrec,numrecs,socket); - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: Stream(%u) connected to %s",streamno,url); + LOG(MCthorDetailedDebugInfo, "SORT Merge READ: Stream(%u) connected to %s",streamno,url); } virtual ~CMergeReadStream() { @@ -108,7 +108,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream #ifdef _FULL_TRACE char url[100]; endpoint.getEndpointHostText(url,sizeof(url)); - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: EOS for %s",url); + LOG(MCthorDetailedDebugInfo, "SORT Merge READ: EOS for %s",url); #endif eos(); } @@ -121,7 +121,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream #ifdef _FULL_TRACE char url[100]; endpoint.getEndpointHostText(url,sizeof(url)); - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: stop for %s",url); + LOG(MCthorDetailedDebugInfo, "SORT Merge READ: stop for %s",url); #endif stream->stop(); eos(); @@ -163,12 +163,12 @@ class CSortMerge: public CSimpleInterface, implements ISocketSelectNotify ~CSortMerge() { #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "~CSortMerge in"); + LOG(MCthorDetailedDebugInfo, "~CSortMerge in"); #endif if (started) closedown(); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "~CSortMerge out"); + LOG(MCthorDetailedDebugInfo, "~CSortMerge out"); #endif } void init() @@ -178,7 +178,7 @@ class CSortMerge: public CSimpleInterface, implements ISocketSelectNotify char name[64]; int port = socket->peer_name(name,sizeof(name)); url.append(name).append(':').append(port); - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge WRITE: start %s, pos=%" RCPF "d, len=%" RCPF "d",url.str(),poscount,numrecs); + LOG(MCthorDetailedDebugInfo, "SORT Merge WRITE: start %s, pos=%" RCPF "d, len=%" RCPF "d",url.str(),poscount,numrecs); rowcount_t pos=poscount; try { @@ -228,7 +228,7 @@ class CSortMerge: public CSimpleInterface, implements ISocketSelectNotify char peer[16]; if (socket) { socket->peer_name(peer,sizeof(peer)-1); - LOG(MCthorDetailedDebugInfo, thorJob, "waitdone %s",peer); + LOG(MCthorDetailedDebugInfo, "waitdone %s",peer); } else peer[0] = 0; @@ -237,7 +237,7 @@ class CSortMerge: public CSimpleInterface, implements ISocketSelectNotify if (exception) throw exception.getClear(); if (peer[0]) - LOG(MCthorDetailedDebugInfo, thorJob, "waitdone exit"); + LOG(MCthorDetailedDebugInfo, "waitdone exit"); } bool notifySelected(ISocket *sock,unsigned selected) { @@ -246,11 +246,11 @@ class CSortMerge: public CSimpleInterface, implements ISocketSelectNotify if (closing) { closing = false; #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "notifySelected calling closedown"); + LOG(MCthorDetailedDebugInfo, "notifySelected calling closedown"); #endif closedown(); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "notifySelected called closedown"); + LOG(MCthorDetailedDebugInfo, "notifySelected called closedown"); #endif done = true; donesem.signal(); @@ -515,7 +515,7 @@ protected: friend class CSortMerge; respos += vMAPL(j,i)-vMAPL(j,i-1); // note we are adding up all of the lower as we want start rowcount_t totalrows = resnum; - LOG(MCthorDetailedDebugInfo, thorJob, "Output start = %" RCPF "d, num = %" RCPF "u",respos,resnum); + LOG(MCthorDetailedDebugInfo, "Output start = %" RCPF "d, num = %" RCPF "u",respos,resnum); IArrayOf readers; IException *exc = NULL; @@ -530,7 +530,7 @@ protected: friend class CSortMerge; { if (i==partno) { - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: Stream(%u) local, pos=%" RCPF "u len=%" RCPF "u",i,sstart,snum); + LOG(MCthorDetailedDebugInfo, "SORT Merge READ: Stream(%u) local, pos=%" RCPF "u len=%" RCPF "u",i,sstart,snum); readers.append(*slave.createMergeInputStream(sstart,snum)); } else @@ -576,7 +576,7 @@ void CSortMerge::closedown() { CriticalBlock block(crit); #ifdef _FULL_TRACE - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge: closing %s",url.str()); + LOG(MCthorDetailedDebugInfo, "SORT Merge: closing %s",url.str()); #endif if (!socket) return; @@ -611,7 +611,7 @@ void CSortMerge::closedown() throw; } started = false; - LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge: finished %s, %d rows merged",url.str(),ndone); + LOG(MCthorDetailedDebugInfo, "SORT Merge: finished %s, %d rows merged",url.str(),ndone); } IMergeTransferServer *createMergeTransferServer(ISortSlaveBase *parent) diff --git a/thorlcr/slave/backup.cpp b/thorlcr/slave/backup.cpp index 2875af63c0a..a64081db1f0 100644 --- a/thorlcr/slave/backup.cpp +++ b/thorlcr/slave/backup.cpp @@ -105,14 +105,14 @@ class CThorBackupHandler : public CSimpleInterface, implements IBackup, implemen { StringBuffer errMsg; if (!currentAbort) - LOG(MCwarning, thorJob, "%s", errMsg.append("Backup inconsistency detected, backup aborted: ").append(item->dst).str()); + LOG(MCwarning, "%s", errMsg.append("Backup inconsistency detected, backup aborted: ").append(item->dst).str()); backupIFile->remove(); } } catch (IException *e) { StringBuffer errMsg("copying: "); - LOG(MCwarning, thorJob, e, errMsg.append(item->src)); + LOG(MCwarning, e, errMsg.append(item->src)); try { backupIFile->remove(); } catch (IException *e) { EXCLOG(e); e->Release(); } if (!ignoreError) throw; diff --git a/thorlcr/slave/slavmain.cpp b/thorlcr/slave/slavmain.cpp index c9acc3303a5..87662eaa881 100644 --- a/thorlcr/slave/slavmain.cpp +++ b/thorlcr/slave/slavmain.cpp @@ -71,7 +71,7 @@ void enableThorSlaveAsDaliClient() { try { - LOG(MCdebugProgress, thorJob, "calling initClientProcess"); + LOG(MCdebugProgress, "calling initClientProcess"); initClientProcess(serverGroup,DCR_ThorSlave, getFixedPort(TPORT_mp)); break; } @@ -79,11 +79,11 @@ void enableThorSlaveAsDaliClient() { if ((e->errorCode()!=JSOCKERR_port_in_use)) throw; - FLLOG(MCexception(e), thorJob, e,"InitClientProcess"); + FLLOG(MCexception(e), e,"InitClientProcess"); if (retry++>10) throw; e->Release(); - LOG(MCdebugProgress, thorJob, "Retrying"); + LOG(MCdebugProgress, "Retrying"); Sleep(retry*2000); } } @@ -450,7 +450,7 @@ class CKJService : public CSimpleInterfaceOf, implements IThreaded, public: CKMContainer(CKJService &_service, CKeyLookupContext *_ctx) - : service(_service), ctx(_ctx), contextLogger(jhtreeCacheStatistics, thorJob) + : service(_service), ctx(_ctx), contextLogger(jhtreeCacheStatistics) { keyManager.setown(ctx->createKeyManager(&contextLogger)); StringBuffer tracing; @@ -1562,11 +1562,11 @@ class CKJService : public CSimpleInterfaceOf, implements IThreaded, } virtual void reset() override { - LOG(MCthorDetailedDebugInfo, thorJob, "KJService reset()"); + LOG(MCthorDetailedDebugInfo, "KJService reset()"); processorPool->stopAll(true); processorPool->joinAll(false); clearAll(); - LOG(MCthorDetailedDebugInfo, thorJob, "KJService reset() done"); + LOG(MCthorDetailedDebugInfo, "KJService reset() done"); } virtual void start() override { @@ -1577,7 +1577,7 @@ class CKJService : public CSimpleInterfaceOf, implements IThreaded, { if (aborted) return; - LOG(MCthorDetailedDebugInfo, thorJob, "KJService stop()"); + LOG(MCthorDetailedDebugInfo, "KJService stop()"); queryNodeComm().cancel(RANK_ALL, keyLookupMpTag); processorPool->stopAll(true); processorPool->joinAll(true); diff --git a/thorlcr/slave/slwatchdog.cpp b/thorlcr/slave/slwatchdog.cpp index 7860eaeecde..898e8b1311a 100644 --- a/thorlcr/slave/slwatchdog.cpp +++ b/thorlcr/slave/slwatchdog.cpp @@ -106,7 +106,7 @@ class CGraphProgressHandlerBase : public CInterfaceOf, implement CriticalBlock b(crit); activeGraphs.append(*LINK(&graph)); StringBuffer str("Watchdog: Start Job "); - LOG(MCthorDetailedDebugInfo, thorJob, "%s", str.append(graph.queryGraphId()).str()); + LOG(MCthorDetailedDebugInfo, "%s", str.append(graph.queryGraphId()).str()); } virtual void stopGraph(CGraphBase &graph, MemoryBuffer *mb) override { @@ -119,7 +119,7 @@ class CGraphProgressHandlerBase : public CInterfaceOf, implement else { StringBuffer str("Watchdog: Stop Job "); - LOG(MCthorDetailedDebugInfo, thorJob, "%s", str.append(graph.queryGraphId()).str()); + LOG(MCthorDetailedDebugInfo, "%s", str.append(graph.queryGraphId()).str()); if (mb) { DelayedSizeMarker sizeMark(*mb); @@ -138,7 +138,7 @@ class CGraphProgressHandlerBase : public CInterfaceOf, implement #endif stopped = true; threaded.join(); - LOG(MCdebugProgress, thorJob, "Stopped watchdog"); + LOG(MCdebugProgress, "Stopped watchdog"); } } virtual void debugRequest(MemoryBuffer &msg, const char *request) const override @@ -173,7 +173,7 @@ class CGraphProgressHandlerBase : public CInterfaceOf, implement // IThreaded virtual void threadmain() override { - LOG(MCthorDetailedDebugInfo, thorJob, "Watchdog: thread running"); + LOG(MCthorDetailedDebugInfo, "Watchdog: thread running"); gatherAndSend(); // send initial data assertex(HEARTBEAT_INTERVAL>=8); unsigned count = HEARTBEAT_INTERVAL+getRandom()%8-4; diff --git a/thorlcr/slave/thslavemain.cpp b/thorlcr/slave/thslavemain.cpp index 1620955ed99..bb6b1ca769d 100644 --- a/thorlcr/slave/thslavemain.cpp +++ b/thorlcr/slave/thslavemain.cpp @@ -119,7 +119,7 @@ static bool RegisterSelf(SocketEndpoint &masterEp) { StringBuffer slfStr; StringBuffer masterStr; - LOG(MCdebugProgress, thorJob, "registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); + LOG(MCdebugProgress, "registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); try { SocketEndpoint ep = masterEp; @@ -234,11 +234,11 @@ static bool RegisterSelf(SocketEndpoint &masterEp) OERRLOG("Failed to connect to all nodes"); else PROGLOG("verified mp connection to rest of cluster"); - LOG(MCdebugProgress, thorJob, "registered %s",slfStr.str()); + LOG(MCdebugProgress, "registered %s",slfStr.str()); } catch (IException *e) { - FLLOG(MCexception(e), thorJob, e,"slave registration error"); + FLLOG(MCexception(e), e,"slave registration error"); e->Release(); return false; } @@ -258,7 +258,7 @@ bool UnregisterSelf(IException *e) StringBuffer slfStr; slfEp.getEndpointHostText(slfStr); - LOG(MCdebugProgress, thorJob, "Unregistering slave : %s", slfStr.str()); + LOG(MCdebugProgress, "Unregistering slave : %s", slfStr.str()); try { CMessageBuffer msg; @@ -266,16 +266,16 @@ bool UnregisterSelf(IException *e) serializeException(e, msg); // NB: allows exception to be NULL if (!queryWorldCommunicator().send(msg, masterNode, MPTAG_THORREGISTRATION, 60*1000)) { - LOG(MCerror, thorJob, "Failed to unregister slave : %s", slfStr.str()); + LOG(MCerror, "Failed to unregister slave : %s", slfStr.str()); return false; } - LOG(MCdebugProgress, thorJob, "Unregistered slave : %s", slfStr.str()); + LOG(MCdebugProgress, "Unregistered slave : %s", slfStr.str()); isRegistered = false; return true; } catch (IException *e) { if (!jobListenerStopped) - FLLOG(MCexception(e), thorJob, e,"slave unregistration error"); + FLLOG(MCexception(e), e,"slave unregistration error"); e->Release(); } return false; @@ -284,9 +284,9 @@ bool UnregisterSelf(IException *e) bool ControlHandler(ahType type) { if (ahInterrupt == type) - LOG(MCdebugProgress, thorJob, "CTRL-C detected"); + LOG(MCdebugProgress, "CTRL-C detected"); else if (!jobListenerStopped) - LOG(MCdebugProgress, thorJob, "SIGTERM detected"); + LOG(MCdebugProgress, "SIGTERM detected"); bool unregOK = false; if (!jobListenerStopped) { @@ -330,7 +330,7 @@ ILogMsgHandler *startSlaveLog() queryLogMsgManager()->removeMonitor(queryStderrLogMsgHandler()); #endif - LOG(MCdebugProgress, thorJob, "Opened log file %s", lf->queryLogFileSpec()); + LOG(MCdebugProgress, "Opened log file %s", lf->queryLogFileSpec()); } else { @@ -346,7 +346,7 @@ ILogMsgHandler *startSlaveLog() } //setupContainerizedStorageLocations(); - LOG(MCdebugProgress, thorJob, "Build %s", hpccBuildInfo.buildTag); + LOG(MCdebugProgress, "Build %s", hpccBuildInfo.buildTag); return logHandler; } @@ -427,7 +427,7 @@ int main( int argc, const char *argv[] ) #ifdef USE_MP_LOG startLogMsgParentReceiver(); - LOG(MCdebugProgress, thorJob, "MPServer started on port %d", getFixedPort(TPORT_mp)); + LOG(MCdebugProgress, "MPServer started on port %d", getFixedPort(TPORT_mp)); #endif SocketEndpoint masterEp(master); @@ -456,7 +456,7 @@ int main( int argc, const char *argv[] ) if (err) { IException *e = makeErrnoExceptionV(-1, "Failed to change dir to '%s'", thorPath.str()); - FLLOG(MCexception(e), thorJob, e); + FLLOG(MCexception(e), e); throw e; } @@ -507,16 +507,16 @@ int main( int argc, const char *argv[] ) useMemoryMappedRead(globals->getPropBool("@useMemoryMappedRead")); - LOG(MCdebugProgress, thorJob, "ThorSlave Version LCR - %d.%d started",THOR_VERSION_MAJOR,THOR_VERSION_MINOR); + LOG(MCdebugProgress, "ThorSlave Version LCR - %d.%d started",THOR_VERSION_MAJOR,THOR_VERSION_MINOR); #ifdef _WIN32 ULARGE_INTEGER userfree; ULARGE_INTEGER total; ULARGE_INTEGER free; if (GetDiskFreeSpaceEx("c:\\",&userfree,&total,&free)&&total.QuadPart) { unsigned pc = (unsigned)(free.QuadPart*100/total.QuadPart); - LOG(MCdebugInfo, thorJob, "Total disk space = %" I64F "d k", total.QuadPart/1000); - LOG(MCdebugInfo, thorJob, "Free disk space = %" I64F "d k", free.QuadPart/1000); - LOG(MCdebugInfo, thorJob, "%d%% disk free\n",pc); + LOG(MCdebugInfo, "Total disk space = %" I64F "d k", total.QuadPart/1000); + LOG(MCdebugInfo, "Free disk space = %" I64F "d k", free.QuadPart/1000); + LOG(MCdebugInfo, "%d%% disk free\n",pc); } #endif @@ -581,12 +581,12 @@ int main( int argc, const char *argv[] ) slaveMain(jobListenerStopped, slaveLogHandler); } - LOG(MCdebugProgress, thorJob, "ThorSlave terminated OK"); + LOG(MCdebugProgress, "ThorSlave terminated OK"); } catch (IException *e) { if (!jobListenerStopped) - FLLOG(MCexception(e), thorJob, e,"ThorSlave"); + FLLOG(MCexception(e), e,"ThorSlave"); unregisterException.setown(e); } #ifndef _CONTAINERIZED diff --git a/thorlcr/thorutil/thbuf.cpp b/thorlcr/thorutil/thbuf.cpp index 2a3450ad6a5..d64d06da1a2 100644 --- a/thorlcr/thorutil/thbuf.cpp +++ b/thorlcr/thorutil/thbuf.cpp @@ -801,7 +801,7 @@ class CSharedWriteAheadBase : public CSimpleInterface, implements ISharedSmartBu { unsigned whichChunk = queryCOutput(output).currentChunkNum - lowestChunk; #ifdef TRACE_WRITEAHEAD - LOG(MCthorDetailedDebugInfo, thorJob, "output=%d, chunk=%d (whichChunk=%d)", output, currentChunkNum, whichChunk); + LOG(MCthorDetailedDebugInfo, "output=%d, chunk=%d (whichChunk=%d)", output, currentChunkNum, whichChunk); #endif rowSet.setown(readRows(output, whichChunk)); assertex(rowSet); @@ -1523,7 +1523,7 @@ class CSharedWriteAheadDisk : public CSharedWriteAheadBase Owned chunk = savedChunks.dequeue(); if (!chunk) break; } - LOG(MCthorDetailedDebugInfo, thorJob, "CSharedWriteAheadDisk: highOffset=%" I64F "d", highOffset); + LOG(MCthorDetailedDebugInfo, "CSharedWriteAheadDisk: highOffset=%" I64F "d", highOffset); } virtual void reset() { diff --git a/thorlcr/thorutil/thormisc.cpp b/thorlcr/thorutil/thormisc.cpp index c2598961693..33c2e2df405 100644 --- a/thorlcr/thorutil/thormisc.cpp +++ b/thorlcr/thorutil/thormisc.cpp @@ -144,7 +144,7 @@ void ActPrintLogArgs(const CGraphElementBase *container, const ActLogEnum flags, return; // suppress logging child activities unless thorlog_all flag StringBuffer res; ActPrintLogArgsPrep(res, container, flags, format, args); - LOG(logCat, thorJob, "%s", res.str()); + LOG(logCat, "%s", res.str()); } void ActPrintLogArgs(const CGraphElementBase *container, IException *e, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, va_list args) @@ -156,7 +156,7 @@ void ActPrintLogArgs(const CGraphElementBase *container, IException *e, const Ac res.append(" : "); e->errorMessage(res); } - LOG(logCat, thorJob, "%s", res.str()); + LOG(logCat, "%s", res.str()); } void ActPrintLogEx(const CGraphElementBase *container, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, ...) @@ -168,7 +168,7 @@ void ActPrintLogEx(const CGraphElementBase *container, const ActLogEnum flags, c va_start(args, format); ActPrintLogArgsPrep(res, container, flags, format, args); va_end(args); - LOG(logCat, thorJob, "%s", res.str()); + LOG(logCat, "%s", res.str()); } void ActPrintLog(const CActivityBase *activity, const char *format, ...) @@ -213,7 +213,7 @@ void GraphPrintLogArgs(CGraphBase *graph, const ActLogEnum flags, const LogMsgCa return; // suppress logging from child graph unless thorlog_all flag StringBuffer res; GraphPrintLogArgsPrep(res, graph, flags, logCat, format, args); - LOG(logCat, thorJob, "%s", res.str()); + LOG(logCat, "%s", res.str()); } void GraphPrintLogArgs(CGraphBase *graph, IException *e, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, va_list args) @@ -227,7 +227,7 @@ void GraphPrintLogArgs(CGraphBase *graph, IException *e, const ActLogEnum flags, res.append(" : "); e->errorMessage(res); } - LOG(logCat, thorJob, "%s", res.str()); + LOG(logCat, "%s", res.str()); } void GraphPrintLog(CGraphBase *graph, IException *e, const char *format, ...) @@ -659,12 +659,12 @@ class CTempNameHandler if (file.isFile()==fileBool::foundYes) { if (log) - LOG(MCdebugInfo, thorJob, "Deleting %s", file.queryFilename()); + LOG(MCdebugInfo, "Deleting %s", file.queryFilename()); try { file.remove(); } catch (IException *e) { if (log) - FLLOG(MCwarning, thorJob, e); + FLLOG(MCwarning, e); e->Release(); } } @@ -717,7 +717,7 @@ class CTempNameHandler catch (IException *e) { if (log) - FLLOG(MCwarning, thorJob, e); + FLLOG(MCwarning, e); e->Release(); } subDirPath.clear(); @@ -756,7 +756,7 @@ void GetTempFilePath(StringBuffer &name, const char *suffix) void SetTempDir(const char *rootTempDir, const char *uniqueSubDir, const char *tempPrefix, bool clearDir) { TempNameHandler.setTempDir(rootTempDir, uniqueSubDir, tempPrefix, clearDir); - LOG(MCdebugProgress, thorJob, "temporary rootTempdir: %s, uniqueSubDir: %s, prefix: %s", rootTempDir, uniqueSubDir, tempPrefix); + LOG(MCdebugProgress, "temporary rootTempdir: %s, uniqueSubDir: %s, prefix: %s", rootTempDir, uniqueSubDir, tempPrefix); } void ClearTempDir() @@ -764,7 +764,7 @@ void ClearTempDir() try { TempNameHandler.clear(true); - LOG(MCthorDetailedDebugInfo, thorJob, "temp directory cleared"); + LOG(MCthorDetailedDebugInfo, "temp directory cleared"); } catch (IException *e) { @@ -823,7 +823,7 @@ void ensureDirectoryForFile(const char *fName) // Not recommended to be used from slaves as tend to be one or more trying at same time. void reportExceptionToWorkunit(IConstWorkUnit &workunit,IException *e, ErrorSeverity severity) { - LOG(MCwarning, thorJob, e, "Reporting exception to WU"); + LOG(MCwarning, e, "Reporting exception to WU"); Owned wu = &workunit.lock(); if (wu) { @@ -1160,12 +1160,12 @@ void CFifoFileCache::deleteFile(IFile &ifile) try { if (!ifile.remove()) - FLLOG(MCoperatorWarning, thorJob, "CFifoFileCache: Failed to remove file (missing) : %s", ifile.queryFilename()); + FLLOG(MCoperatorWarning, "CFifoFileCache: Failed to remove file (missing) : %s", ifile.queryFilename()); } catch (IException *e) { StringBuffer s("Failed to remove file: "); - FLLOG(MCoperatorWarning, thorJob, e, s.append(ifile.queryFilename())); + FLLOG(MCoperatorWarning, e, s.append(ifile.queryFilename())); } } diff --git a/thorlcr/thorutil/thormisc.hpp b/thorlcr/thorutil/thormisc.hpp index ea131972dd0..0e79d309369 100644 --- a/thorlcr/thorutil/thormisc.hpp +++ b/thorlcr/thorutil/thormisc.hpp @@ -122,7 +122,7 @@ #define THOR_SEM_RETRY_TIMEOUT 2 // Logging -extern graph_decl LogMsgJobInfo thorJob; +extern graph_decl LogMsgJobInfo thorJob; // Only used for removing the active job when the job finishes enum ThorExceptionAction { tea_null, tea_warning, tea_abort, tea_shutdown }; @@ -284,7 +284,7 @@ class graph_decl CTimeoutTrigger : public CInterface, implements IThreaded void stop() { running = false; todo.signal(); } void inform(IException *e) { - LOG(MCdebugProgress, thorJob, "INFORM [%s]", description.get()); + LOG(MCdebugProgress, "INFORM [%s]", description.get()); CriticalBlock block(crit); if (exception.get()) e->Release(); @@ -299,7 +299,7 @@ class graph_decl CTimeoutTrigger : public CInterface, implements IThreaded CriticalBlock block(crit); IException *e = exception.getClear(); if (e) - LOG(MCdebugProgress, thorJob, "CLEARING TIMEOUT [%s]", description.get()); + LOG(MCdebugProgress, "CLEARING TIMEOUT [%s]", description.get()); todo.signal(); return e; } diff --git a/tools/swapnode/swapnodelib.cpp b/tools/swapnode/swapnodelib.cpp index 8a8df9a1108..649c6dcfd09 100644 --- a/tools/swapnode/swapnodelib.cpp +++ b/tools/swapnode/swapnodelib.cpp @@ -42,8 +42,6 @@ #define SDS_LOCK_TIMEOUT 30000 #define SWAPNODE_RETRY_TIME (1000 * 60 * 60 * 1) // 1hr -static const LogMsgJobInfo swapnodeJob(UnknownJob, UnknownUser); - static bool ensureThorIsDown(const char *cluster, bool nofail, bool wait) { bool retry = false; @@ -781,7 +779,7 @@ class CAutoSwapNode : public CSwapNode StringBuffer msg; msg.appendf("AUTOSWAPNODE: cluster %s node %d: swapped out %s, swapped in %s", groupName.get(), badrank.item(i4) + 1, from.str(), to.str()); emailSwap(msg.str()); - FLLOG(MCoperatorError, swapnodeJob, "%s", msg.str()); + FLLOG(MCoperatorError, "%s", msg.str()); } } return true;