Forráskód Böngészése

HPCC-21529 ECLCC - Make sure audience and message class is sensible

Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Shamser Ahmed 6 éve
szülő
commit
34c5f03f63

+ 6 - 6
ecl/agentexec/agentexec.cpp

@@ -46,7 +46,7 @@ void CEclAgentExecutionServer::start()
 {
     if (started)
     {
-        WARNLOG("START called when already started\n");
+        DBGLOG("START called when already started\n");
         assert(false);
     }
 
@@ -76,7 +76,7 @@ void CEclAgentExecutionServer::start()
     agentName.set(sb);
     if (!agentName.length())
     {
-        ERRLOG("'name' not specified in properties file\n");
+        OERRLOG("'name' not specified in properties file\n");
         throwUnexpected();
     }
     setStatisticsComponentName(SCThthor, agentName, true);
@@ -85,7 +85,7 @@ void CEclAgentExecutionServer::start()
     properties->getProp("@daliServers", daliServers);
     if (!daliServers.length())
     {
-        ERRLOG("'daliServers' not specified in properties file\n");
+        OERRLOG("'daliServers' not specified in properties file\n");
         throwUnexpected();
     }
 
@@ -129,7 +129,7 @@ int CEclAgentExecutionServer::run()
     }
     catch(...)
     {
-        ERRLOG("Terminating unexpectedly");
+        IERRLOG("Terminating unexpectedly");
     }
 
     CSDSServerStatus serverStatus("HThorServer");
@@ -159,13 +159,13 @@ int CEclAgentExecutionServer::run()
                 }
                 catch(...)
                 {
-                    ERRLOG("Unexpected exception in CEclAgentExecutionServer::run caught");
+                    IERRLOG("Unexpected exception in CEclAgentExecutionServer::run caught");
                 }
             }
             else
             {
                 if (started)
-                    ERRLOG("Unexpected dequeue of bogus job queue item, exiting agentexec");
+                   IERRLOG("Unexpected dequeue of bogus job queue item, exiting agentexec");
                 removeSentinelFile(sentinelFile);//no reason to restart
                 assert(!started);
                 break;

+ 29 - 29
ecl/eclagent/eclagent.cpp

@@ -216,7 +216,7 @@ public:
                 ++port;
             else
             {
-                DBGLOG("No DEBUG ports currently available in range %d - %d",HTHOR_DEBUG_BASE_PORT, HTHOR_DEBUG_BASE_PORT + HTHOR_DEBUG_PORT_RANGE); // MORE - or has terminated?
+                OWARNLOG("No DEBUG ports currently available in range %d - %d",HTHOR_DEBUG_BASE_PORT, HTHOR_DEBUG_BASE_PORT + HTHOR_DEBUG_PORT_RANGE); // MORE - or has terminated?
                 MilliSleep(5000);
                 port = HTHOR_DEBUG_BASE_PORT;
             }
@@ -350,7 +350,7 @@ public:
                 if (traceLevel > 8)
                 {
                     StringBuffer b;
-                    DBGLOG("No data reading query from socket");
+                    IWARNLOG("No data reading query from socket");
                 }
                 client.clear();
                 return;
@@ -362,7 +362,7 @@ public:
             if (traceLevel > 0)
             {
                 StringBuffer b;
-                DBGLOG("Error reading query from socket: %s", E->errorMessage(b).str());
+                IERRLOG("Error reading query from socket: %s", E->errorMessage(b).str());
             }
             E->Release();
             client.clear();
@@ -388,7 +388,7 @@ public:
             catch (IException *E)
             {
                 StringBuffer s;
-                DBGLOG("ERROR: Invalid XML received from %s:%s", E->errorMessage(s).str(), rawText.str());
+                IERRLOG("ERROR: Invalid XML received from %s:%s", E->errorMessage(s).str(), rawText.str());
                 throw;
             }
             bool isRequest = false;
@@ -423,7 +423,7 @@ public:
 
     virtual bool stop() override
     {
-        ERRLOG("CHThorDebugSocketWorker stopped with queries active");
+        IERRLOG("CHThorDebugSocketWorker stopped with queries active");
         return true; 
     }
 
@@ -671,7 +671,7 @@ void EclAgent::unlockWorkUnit()
     {
         IWorkUnit *w = wuWrite.getClear();
         if (!w->Release()) 
-            ERRLOG("EclAgent::unlockWorkUnit workunit not released");
+            IERRLOG("EclAgent::unlockWorkUnit workunit not released");
     }
 }
 
@@ -1647,7 +1647,7 @@ IHThorGraphResults * EclAgent::createGraphLoopResults()
 
 void addException(IWorkUnit *w, ErrorSeverity severity, const char * source, unsigned code, const char * text, const char * filename, unsigned lineno, unsigned column, bool failOnError)
 {
-    PrintLog("%s", text);
+    UERRLOG("%s", text);
     if ((severity == SeverityError) && (w->getState()!=WUStateAborting) && failOnError)
         w->setState(WUStateFailed);
     addExceptionToWorkunit(w, severity, source, code, text, filename, lineno, column, 0);
@@ -1819,7 +1819,7 @@ void EclAgent::setRetcode(int code)
 void EclAgent::doProcess()
 {
 #ifdef _DEBUG
-    PrintLog ("Entering doProcess ()");
+    DBGLOG("Entering doProcess ()");
 #endif
     bool failed = true;
     CCycleTimer elapsedTimer;
@@ -1869,7 +1869,7 @@ void EclAgent::doProcess()
             if (checkVersion && (process->getActivityVersion() != eclccCodeVersion))
                 failv(0, "Inconsistent interface versions.  Workunit was created using eclcc for version %u, but the c++ compiler used version %u", eclccCodeVersion, process->getActivityVersion());
 
-            PrintLog("Starting process");
+            DBGLOG("Starting process");
             runProcess(process);
             failed = false;
         }
@@ -1905,7 +1905,7 @@ void EclAgent::doProcess()
         logException((IException *) NULL);
     }
 
-    PrintLog("Process complete");
+    DBGLOG("Process complete");
     // Add some timing stats
     bool deleteJobTemps = true;
     try
@@ -1966,7 +1966,7 @@ void EclAgent::doProcess()
                     e->errorMessage(msg);
                     logException(SeverityWarning, code, msg.str(), false);
                     e->Release();
-                    WARNLOG("%s (%d)", msg.str(), code);
+                    UWARNLOG("%s (%d)", msg.str(), code);
                 }
             }
 
@@ -1995,7 +1995,7 @@ void EclAgent::doProcess()
                 e->Release();
             }
             if (rmMsg.length())
-                WARNLOG(errCode, "%s", rmMsg.str());
+                UWARNLOG(errCode, "%s", rmMsg.str());
         }
 
         if (globals->getPropBool("DUMPFINALWU", false))
@@ -2046,7 +2046,7 @@ void EclAgent::doProcess()
         }
         e->Release();
     }
-    PrintLog("Workunit written complete");
+    DBGLOG("Workunit written complete");
 }
 
 void EclAgent::runProcess(IEclProcess *process)
@@ -2418,7 +2418,7 @@ void EclAgent::logException(ErrorSeverity severity, unsigned code, const char *
 {
     addException(severity, "eclagent", code, text, NULL, 0, 0, true, isAbort);
     if (severity == SeverityError)
-        ERRLOG(code, "%s", text);
+        UERRLOG(code, "%s", text);
 }
 
 void EclAgent::addException(ErrorSeverity severity, const char * source, unsigned code, const char * text, const char * filename, unsigned lineno, unsigned column, bool failOnError, bool isAbort)
@@ -2447,20 +2447,20 @@ void EclAgent::addException(ErrorSeverity severity, const char * source, unsigne
     {
         StringBuffer m;
         E->errorMessage(m);
-        PrintLog("Unable to record exception in workunit: %s", m.str());
+        IERRLOG("Unable to record exception in workunit: %s", m.str());
         E->Release();
     }
     catch (std::bad_alloc &)
     {
-        PrintLog("Unable to record exception in workunit: out of memory (std::bad_alloc)");
+        IERRLOG("Unable to record exception in workunit: out of memory (std::bad_alloc)");
     }
     catch (std::exception & e)
     {
-        PrintLog("Unable to record exception in workunit: standard library exception (std::exception %s)", e.what());
+        IERRLOG("Unable to record exception in workunit: standard library exception (std::exception %s)", e.what());
     }
     catch (...)
     {
-        PrintLog("Unable to record exception in workunit: unknown exception");
+        IERRLOG("Unable to record exception in workunit: unknown exception");
     }
 }
 
@@ -2531,13 +2531,13 @@ static unsigned __int64 crcLogicalFileTime(IDistributedFile * file, unsigned __i
     CDateTime dt;
     file->getModificationTime(dt);
     unsigned __int64 modifiedTime = dt.getSimple();
-    PrintLog("getDatasetHash adding crc %" I64F "u for file %s", modifiedTime, filename);
+    IERRLOG("getDatasetHash adding crc %" I64F "u for file %s", modifiedTime, filename);
     return rtlHash64Data(sizeof(modifiedTime), &modifiedTime, crc);
 }
 
 unsigned __int64 EclAgent::getDatasetHash(const char * logicalName, unsigned __int64 crc)
 {
-    PrintLog("getDatasetHash initial crc %" I64F "x", crc);
+    IERRLOG("getDatasetHash initial crc %" I64F "x", crc);
 
     StringBuffer fullname;
     expandLogicalName(fullname, logicalName);
@@ -2575,9 +2575,9 @@ unsigned __int64 EclAgent::getDatasetHash(const char * logicalName, unsigned __i
             crc = crcLogicalFileTime(file, crc, fullname.str());
     }
     else
-        PrintLog("getDatasetHash did not find file %s", fullname.str());
+        IERRLOG("getDatasetHash did not find file %s", fullname.str());
 
-    PrintLog("getDatasetHash final crc %" I64F "x", crc);
+    IERRLOG("getDatasetHash final crc %" I64F "x", crc);
     return crc;
 }
 
@@ -3100,7 +3100,7 @@ void EclAgent::reportProgress(const char *progress, unsigned flags)
     if (progress)
     {
         // MORE - think about how to best do this
-        PrintLog("%s", progress);
+        LOG(MCdebugProgress, unknownJob,"%s", progress);
 //      WorkunitUpdate wu = updateWorkUnit();
 //      wu->reportProgress(progress, flags);
     }
@@ -3179,7 +3179,7 @@ void EclAgent::abortMonitor()
             while (abortmonitor->sem.wait(ABORT_DEADMAN_INTERVAL*1000))
                 if (abortmonitor->stopping)
                     return; // stopped in time
-            ERRLOG("EclAgent failed to abort within %ds - killing process",ABORT_DEADMAN_INTERVAL);
+            IERRLOG("EclAgent failed to abort within %ds - killing process",ABORT_DEADMAN_INTERVAL);
             break;
         }
     }
@@ -3239,7 +3239,7 @@ IGroup *EclAgent::getHThorGroup(StringBuffer &out)
         mygroupname.append('_').append(ins);
     }
     // this shouldn't happen but..
-    WARNLOG("Adding group %s",mygroupname.str());
+    DBGLOG("Adding group %s",mygroupname.str());
     queryNamedGroupStore().add(mygroupname.str(),mygrp,true);
     out.append(mygroupname);
     return queryNamedGroupStore().lookup(mygroupname.str());
@@ -3256,7 +3256,7 @@ void printStart(int argc, const char *argv[])
             cmd.append(' ');
         cmd.append('"').append(argv[argno]).append('"');
     }
-    PrintLog("Starting %s", cmd.str());
+    LOG(MCoperatorInfo,"Starting %s", cmd.str());
 }
 
 //--------------------------------------------------------------
@@ -3465,7 +3465,7 @@ extern int HTHOR_API eclagent_main(int argc, const char *argv[], StringBuffer *
                 MTIME_SECTION(queryActiveTimer(), "Environment_Initialize");
                 setPasswordsFromSDS();
             }
-            PrintLog("ECLAGENT build %s", BUILD_TAG);
+            LOG(MCoperatorInfo, "ECLAGENT build %s", BUILD_TAG);
             startLogMsgParentReceiver();    
             connectLogMsgManagerToDali();
 
@@ -3600,7 +3600,7 @@ extern int HTHOR_API eclagent_main(int argc, const char *argv[], StringBuffer *
                     msg.append("Failed to deschedule unknown workunit ").append(wuid.str()).append(": ");
                     e->errorMessage(msg);
                     e->Release();
-                    WARNLOG("%s (%d)", msg.str(), code);
+                    IWARNLOG("%s (%d)", msg.str(), code);
                 }
                 retcode = 255;
             }
@@ -3626,7 +3626,7 @@ extern int HTHOR_API eclagent_main(int argc, const char *argv[], StringBuffer *
     roxiemem::releaseRoxieHeap();
     ::closedownClientProcess(); // dali client closedown
     if (traceLevel)
-        PrintLog("exiting");
+        DBGLOG("exiting");
 
     return retcode;
 }

+ 1 - 1
ecl/eclagent/eclagentmain.cpp

@@ -86,7 +86,7 @@ int main(int argc, const char *argv[])
         }
         catch (...)
         {
-            ERRLOG("Eclagent execution error: Unexpected exception");
+            IERRLOG("Eclagent execution error: Unexpected exception");
             ret = 2;
         }
         releaseAtoms();

+ 18 - 18
ecl/eclcc/eclcc.cpp

@@ -489,7 +489,7 @@ static int doMain(int argc, const char *argv[])
 #ifndef _DEBUG
     catch (...)
     {
-        ERRLOG("Unexpected exception\n");
+        IERRLOG("Unexpected exception\n");
         return 4;
     }
 #endif
@@ -530,7 +530,7 @@ bool setTargetPlatformOption(const char *platform, ClusterType &optTargetCluster
     ClusterType clusterType = getClusterType(platform);
     if (clusterType == NoCluster)
     {
-        ERRLOG("Unknown ecl target platform %s\n", platform);
+        UERRLOG("Unknown ecl target platform %s\n", platform);
         return false;
     }
     optTargetClusterType = clusterType;
@@ -756,9 +756,9 @@ void EclCC::reportCompileErrors(IErrorReceiver & errorProcessor, const char * pr
 #endif
                 if (strstr(s.str(), noCompiler))
                 {
-                    ERRLOG("Fatal Error: Unable to locate C++ compiler/linker");
+                    OERRLOG("Fatal Error: Unable to locate C++ compiler/linker");
                 }
-                ERRLOG("\n---------- compiler output --------------\n%s\n--------- end compiler output -----------", s.str());
+                UERRLOG("\n---------- compiler output --------------\n%s\n--------- end compiler output -----------", s.str());
             }
         }
     }
@@ -859,7 +859,7 @@ void EclCC::instantECL(EclCompileInstance & instance, IWorkUnit *wu, const char
                     fprintf(stdout, "Output file '%s' created\n",outputFile);
                     break;
                 case WUStateFailed:
-                    ERRLOG("Failed to create output file '%s'\n",outputFile);
+                    UERRLOG("Failed to create output file '%s'\n",outputFile);
                     break;
                 case WUStateUploadingFiles:
                     fprintf(stdout, "Output file '%s' created, local file upload required\n",outputFile);
@@ -868,7 +868,7 @@ void EclCC::instantECL(EclCompileInstance & instance, IWorkUnit *wu, const char
                     fprintf(stdout, "No DLL/SO required\n");
                     break;
                 default:
-                    ERRLOG("Unexpected Workunit state %d\n", (int) wu->getState());
+                    UERRLOG("Unexpected Workunit state %d\n", (int) wu->getState());
                     break;
                 }
             }
@@ -1219,10 +1219,10 @@ void EclCC::processSingleQuery(EclCompileInstance & instance,
                 updateArchiveFromCache(instance.archive, cache, queryAttributePath);
                 return;
             }
-            DBGLOG("Cannot create archive from cache for %s because it is a macro", queryAttributePath);
+            UWARNLOG("Cannot create archive from cache for %s because it is a macro", queryAttributePath);
         }
         else
-            DBGLOG("Cannot create archive from cache for %s because it is not up to date", queryAttributePath);
+            UWARNLOG("Cannot create archive from cache for %s because it is not up to date", queryAttributePath);
     }
 
     {
@@ -1860,7 +1860,7 @@ void EclCC::generateOutput(EclCompileInstance & instance)
                     Owned<IPipeProcess> pipe = createPipeProcess();
                     if (!pipe->run("git", "git describe --always --tags --dirty --long", ".", false, true, false, 0, false))
                     {
-                        WARNLOG("Failed to run git describe");
+                        UWARNLOG("Failed to run git describe");
                     }
                     else
                     {
@@ -1871,7 +1871,7 @@ void EclCC::generateOutput(EclCompileInstance & instance)
                             Owned<ISimpleReadStream> pipeReader = pipe->getOutputStream();
                             readSimpleStream(buf, *pipeReader, 128);
                             if (retcode)
-                                WARNLOG("Failed to run git describe: returned %d (%s)", retcode, buf.str());
+                                UWARNLOG("Failed to run git describe: returned %d (%s)", retcode, buf.str());
                             else if (buf.length())
                             {
                                 buf.replaceString("\n","");
@@ -1934,7 +1934,7 @@ bool EclCC::generatePrecompiledHeader()
 {
     if (inputFiles.ordinality() != 0)
     {
-        ERRLOG("No input files should be specified when generating precompiled header");
+        UERRLOG("No input files should be specified when generating precompiled header");
         return false;
     }
     StringArray paths;
@@ -1953,7 +1953,7 @@ bool EclCC::generatePrecompiledHeader()
     }
     if (!foundPath)
     {
-        ERRLOG("Cannot find eclinclude4.hpp");
+        UERRLOG("Cannot find eclinclude4.hpp");
         return false;
     }
     Owned<ICppCompiler> compiler = createCompiler("precompile", foundPath, NULL);
@@ -1975,7 +1975,7 @@ bool EclCC::generatePrecompiledHeader()
     }
     else
     {
-        ERRLOG("Compilation failed - see %s for details", cclogFilename.str());
+        UERRLOG("Compilation failed - see %s for details", cclogFilename.str());
         return false;
     }
 }
@@ -2043,7 +2043,7 @@ bool EclCC::processFiles()
     {
         if (optBatchMode || !optQueryRepositoryReference)
         {
-            ERRLOG("No input files could be opened");
+            UERRLOG("No input files could be opened");
             return false;
         }
     }
@@ -2712,7 +2712,7 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
         {
             if (!checkFileExists(optIniFilename))
             {
-                ERRLOG("Error: INI file '%s' does not exist",optIniFilename.get());
+                UERRLOG("Error: INI file '%s' does not exist",optIniFilename.get());
                 return 1;
             }
         }
@@ -2730,7 +2730,7 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
             const char * split = strchr(tempArg, ':');
             if (!split)
             {
-                ERRLOG("Error: syntax is -split=part:splits\n");
+                UERRLOG("Error: syntax is -split=part:splits\n");
                 return 1;
             }
             batchSplit = atoi(split+1);
@@ -2803,7 +2803,7 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
         }
         else if (arg[0] == '-')
         {
-            ERRLOG("Error: unrecognised option %s",arg);
+            UERRLOG("Error: unrecognised option %s",arg);
             usage();
             return 1;
         }
@@ -2844,7 +2844,7 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
     {
         if (optGenerateHeader || optShowPaths || (!optBatchMode && optQueryRepositoryReference))
             return 0;
-        ERRLOG("No input filenames supplied");
+        UERRLOG("No input filenames supplied");
         return 1;
     }
     return 0;

+ 6 - 6
ecl/eclccserver/eclccserver.cpp

@@ -220,7 +220,7 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
                 }
             }
             else
-                DBGLOG("Unrecognised error: %s", errStr);
+                IERRLOG("Unrecognised error: %s", errStr);
         }
         catch (IException *E)
         {
@@ -663,7 +663,7 @@ public:
                     }
                     catch(...)
                     {
-                        ERRLOG("Unexpected exception in eclccServer::run caught");
+                        IERRLOG("Unexpected exception in eclccServer::run caught");
                     }
                 }
             }
@@ -676,7 +676,7 @@ public:
             }
             catch (...)
             {
-                DBGLOG("Unknown exception caught in eclccServer::run - restarting");
+                IERRLOG("Unknown exception caught in eclccServer::run - restarting");
                 releaseAtoms();
                 ExitModuleObjects();
                 _exit(2);
@@ -774,7 +774,7 @@ int main(int argc, const char *argv[])
     }
     catch(...)
     {
-        ERRLOG("Failed to load eclccserver.xml");
+        OERRLOG("Failed to load eclccserver.xml");
         return 1;
     }
 
@@ -792,7 +792,7 @@ int main(int argc, const char *argv[])
     const char *daliServers = globals->queryProp("@daliServers");
     if (!daliServers)
     {
-        WARNLOG("No Dali server list specified - assuming local");
+        UWARNLOG("No Dali server list specified - assuming local");
         daliServers = ".";
     }
     Owned<IGroup> serverGroup = createIGroup(daliServers, DALI_SERVER_PORT);
@@ -823,7 +823,7 @@ int main(int argc, const char *argv[])
     }
     catch(...)
     {
-        ERRLOG("Terminating unexpectedly");
+        IERRLOG("Terminating unexpectedly");
     }
     stopPerformanceMonitor();
     globals.clear();

+ 1 - 1
ecl/eclcmd/eclcmd_shell.cpp

@@ -153,7 +153,7 @@ int EclCMDShell::run()
 #ifndef _DEBUG
     catch (...)
     {
-        ERRLOG("Unexpected exception\n");
+        IERRLOG("Unexpected exception\n");
         return 4;
     }
 #endif

+ 8 - 7
ecl/eclscheduler/eclscheduler.cpp

@@ -123,8 +123,9 @@ public:
     void stop() { processor->stop(); }
     virtual bool fireException(IException *e) 
     { 
-        StringBuffer msg; ERRLOG("Scheduler error: %d: %s", e->errorCode(), e->errorMessage(msg).str()); e->Release(); 
-        ERRLOG("Scheduler will now terminate"); 
+        StringBuffer msg;
+        OERRLOG("Scheduler error: %d: %s", e->errorCode(), e->errorMessage(msg).str()); e->Release(); 
+        OERRLOG("Scheduler will now terminate"); 
         waiter.onAbort();
         return false; 
     }
@@ -144,7 +145,7 @@ private:
                 Owned<IConstWorkUnit> w = factory->openWorkUnit(wuid);
                 if (!w)
                 {
-                    ERRLOG("Scheduled workunit %s no longer exists - descheduling", wuid);
+                    OERRLOG("Scheduled workunit %s no longer exists - descheduling", wuid);
                     descheduleWorkunit(wuid);
                     wfconn->remove();
                 }
@@ -193,7 +194,7 @@ int main(int argc, const char *argv[])
         iniFileName = "eclccserver.xml";
     else
     {
-        ERRLOG("Cannot find eclscheduler.xml or eclccserver.xml");
+        OERRLOG("Cannot find eclscheduler.xml or eclccserver.xml");
         return 1;
     }
     try
@@ -202,7 +203,7 @@ int main(int argc, const char *argv[])
     }
     catch(...)
     {
-        ERRLOG("Failed to load %s", iniFileName);
+        OERRLOG("Failed to load %s", iniFileName);
         return 1;
     }
     openLogFile();
@@ -213,7 +214,7 @@ int main(int argc, const char *argv[])
     const char *daliServers = globals->queryProp("@daliServers");
     if (!daliServers)
     {
-        WARNLOG("No Dali server list specified - assuming local");
+        OWARNLOG("No Dali server list specified - assuming local");
         daliServers = ".";
     }
     Owned<IGroup> serverGroup = createIGroup(daliServers, DALI_SERVER_PORT);
@@ -248,7 +249,7 @@ int main(int argc, const char *argv[])
     }
     catch(...)
     {
-        ERRLOG("Terminating unexpectedly");
+        IERRLOG("Terminating unexpectedly");
     }
     globals.clear();
     UseSysLogForOperatorMessages(false);

+ 3 - 3
ecl/hql/hqlcollect.cpp

@@ -332,7 +332,7 @@ bool FileSystemFile::checkValid()
                 }
                 else
                 {
-                    WARNLOG("getECLPluginDefinition not found in %s, unloading", filename);
+                    UWARNLOG("getECLPluginDefinition not found in %s, unloading", filename);
                     return false;
                 }
             }
@@ -414,7 +414,7 @@ void FileSystemDirectory::addFile(IFile &file, bool allowPlugins)
                 contents.append(*newSource.getClear());
             else
             {
-                WARNLOG("Duplicate module found at %s", filename);
+                UWARNLOG("Duplicate module found at %s", filename);
             }
         }
     }
@@ -796,7 +796,7 @@ CXmlEclElement * CXmlEclElement::select(IIdAtom * _name, EclSourceType _type, IP
     else if (_tree)
     {
         //Some old archives seeem to contain duplicate definitions.  Clean then up then delete this code
-        DBGLOG("Source Seems to have duplicate definition of %s", str(_name));
+        UWARNLOG("Source Seems to have duplicate definition of %s", str(_name));
         //throwUnexpected();
     }
 

+ 10 - 13
ecl/hql/hqlexpr.cpp

@@ -6267,7 +6267,7 @@ void CHqlField::onCreateField()
 #endif
 #ifdef DEBUG_ON_CREATE
     if (queryName() == createIdAtom("imgLength"))
-        PrintLog("Create field %s=%p", expr->queryName()->str(), expr);
+        DBGLOG("Create field %s=%p", expr->queryName()->str(), expr);
 #endif
 
     infoFlags &= ~(HEFfunctionOfGroupAggregate);
@@ -6714,7 +6714,7 @@ void CHqlDataset::cacheParent()
             }
             else
             {
-                PrintLog("cacheParent->queryDataset get NULL for: %s", getOpString(inDs->getOperator()));
+                DBGLOG("cacheParent->queryDataset get NULL for: %s", getOpString(inDs->getOperator()));
             }
         }
         break;
@@ -8726,7 +8726,7 @@ void CHqlRemoteScope::noteExternalLookup(HqlLookupContext & ctx, IHqlExpression
 
 IHqlExpression *CHqlRemoteScope::lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx)
 {
-//  PrintLog("lookupSymbol %s#%d", searchName->getAtomNamePtr(),version);
+//  DBGLOG("lookupSymbol %s#%d", searchName->getAtomNamePtr(),version);
     preloadSymbols(ctx, false);
     OwnedHqlExpr resolvedSym = resolved->lookupSymbol(searchName, lookupFlags, ctx);
     if (resolvedSym && resolvedSym->getOperator() == no_processing)
@@ -10129,7 +10129,7 @@ CHqlContextScope::CHqlContextScope(IHqlScope* _scope) : CHqlScope(no_privatescop
             defined.setValue(lower(valueId),value);
         }
     }
-    //PrintLog(debug.str());
+    //DBGLOG(debug.str());
 }
 
 //==============================================================================================================
@@ -14022,16 +14022,13 @@ static bool queryOriginalName(ITypeInfo* type, StringBuffer& s)
 }
 
 
-void PrintLogExprTree(IHqlExpression *expr, const char *caption, bool full)
+void PrintLogExprTree(IHqlExpression *expr, const char *caption)
 {
-    StringBuffer s;
-    toECL(expr, s, full);
-    s.append('\n');
+#ifndef DISABLE_PRINTLOG
     if (caption)
-        PrintLog(caption);
-    else if (full)
-        s.insert(0, "\n");
-    PrintLogDirect(s.str());
+        IERRLOG("%s", caption);
+    dbglogExpr(expr);
+#endif
 }
 
 //========This will go to IExpression implementations ======================================================================================================
@@ -14504,7 +14501,7 @@ extern HQL_API IHqlExpression *doInstantEclTransformations(IHqlExpression *qquer
     }
     catch (...)
     {
-        PrintLog("InstantECL transformations - exception caught");
+        IERRLOG("InstantECL transformations - exception caught");
     }
     return LINK(qquery);
 }

+ 1 - 1
ecl/hql/hqlexpr.hpp

@@ -1529,7 +1529,7 @@ extern HQL_API IHqlExpression * queryJoinRhs(IHqlExpression * expr);
 
 extern HQL_API void lockTransformMutex();
 extern HQL_API void unlockTransformMutex();
-extern HQL_API void PrintLogExprTree(IHqlExpression *expr, const char *caption = NULL, bool full = false);
+extern HQL_API void PrintLogExprTree(IHqlExpression *expr, const char *caption = NULL);
 
 extern HQL_API IHqlExpression *doInstantEclTransformations(IHqlExpression *qquery, unsigned limit);
 //extern HQL_API void loadImplicitScopes(IEclRepository &dataServer, HqlScopeArray &defualtScopes, int suppress, IIdAtom * suppressName);

+ 2 - 2
ecl/hql/hqlexpr.ipp

@@ -538,7 +538,7 @@ public:
                 VStringBuffer statusCmd("git status --porcelain -z -- %s", sourcePath->queryStr());
                 if (!pipe->run("git", statusCmd, ".", false, true, false, 0, false))
                 {
-                    WARNLOG("Failed to run git status for %s", sourcePath->queryStr());
+                    UWARNLOG("Failed to run git status for %s", sourcePath->queryStr());
                 }
                 else
                 {
@@ -549,7 +549,7 @@ public:
                         Owned<ISimpleReadStream> pipeReader = pipe->getOutputStream();
                         readSimpleStream(buf, *pipeReader, 128);
                         if (retcode)
-                            WARNLOG("Failed to run git status for %s: returned %d (%s)", sourcePath->queryStr(), retcode, buf.str());
+                            UWARNLOG("Failed to run git status for %s: returned %d (%s)", sourcePath->queryStr(), retcode, buf.str());
                         else if (buf.length())
                             dirtyState = dirty;
                         else

+ 1 - 1
ecl/hql/hqlfold.cpp

@@ -1367,7 +1367,7 @@ IValue * foldExternalCall(IHqlExpression* expr, unsigned foldOptions, ITemplateC
     void *funcptr = loadExternalEntryPoint(expr, foldOptions, templateContext, library.str(), entry.str(), hDll);
     if (!funcptr)
     {
-        DBGLOG("Failed to load function %s", entry.str());
+        UERRLOG("Failed to load function %s", entry.str());
         return NULL;
     }
     return doFoldExternalCall(expr, foldOptions, templateContext, library.str(), entry.str(), funcptr);

+ 2 - 2
ecl/hql/hqlgram.y

@@ -1051,7 +1051,7 @@ macro
                             Owned<IFileContents> contents = $1.getContents();
                             IHqlExpression* expr = createUnknown(no_macro, makeBoolType(), macroAtom, LINK(contents));
 #if defined(TRACE_MACRO)
-                            PrintLog("MACRO>> verify: macro definition at %d:%d\n",yylval.startLine, yylval.startColumn);
+                            DBGLOG("MACRO>> verify: macro definition at %d:%d\n",yylval.startLine, yylval.startColumn);
 #endif
 
                             //Use a named symbol to associate a line number/column
@@ -1067,7 +1067,7 @@ macro
                             IHqlExpression* expr = createUnknown(no_macro, makeVoidType(), macroAtom, LINK(contents));
 
 #if defined(TRACE_MACRO)
-                            PrintLog("MACRO>> verify: macro definition at %d:%d\n",yylval.startLine, yylval.startColumn);
+                            DBGLOG("MACRO>> verify: macro definition at %d:%d\n",yylval.startLine, yylval.startColumn);
 #endif
 
                             //Use a named symbol to associate a line number/column

+ 4 - 4
ecl/hql/hqlgram2.cpp

@@ -3762,7 +3762,7 @@ IHqlExpression *HqlGram::lookupSymbol(IIdAtom * searchName, const attribute& err
                 IHqlExpression * match = cur.queryParameter(searchName);
                 if (match)
                 {
-    //                  PrintLog("Lookup %s got parameter %s", searchName->getAtomNamePtr(), searchName->getAtomNamePtr());
+    //                  DBGLOG("Lookup %s got parameter %s", searchName->getAtomNamePtr(), searchName->getAtomNamePtr());
                     return LINK(match);
                 }
             }
@@ -9678,7 +9678,7 @@ void HqlGram::doDefineSymbol(DefineIdSt * defineid, IHqlExpression * _expr, IHql
                 lookupCtx.notePrivateSymbols(activeScope.privateScope);
 
             //static int i = 0;
-            //PrintLog("Kill private scope: %d at %s:%d because of %s", ++i, filename->str(), idattr.lineno, current_id->str());
+            //IERRLOG("Kill private scope: %d at %s:%d because of %s", ++i, filename->str(), idattr.lineno, current_id->str());
             activeScope.newPrivateScope();
             targetScope = activeScope.localScope;
             lastpos = semiColonPos+1;
@@ -11557,7 +11557,7 @@ static void getTokenText(StringBuffer & msg, int token)
         {
             /* if fail, use "hqltest -internal" to find out why. */
             msg.appendf("???");
-            //PrintLog("Internal error: Error handler unknown token %d", expected[i]);
+            //IERRLOG("Internal error: Error handler unknown token %d", expected[i]);
             assertex(!"Token not mapped to text");
         }
     }
@@ -12781,7 +12781,7 @@ IHqlExpression *HqlGram::yyParse(bool _parsingTemplateAttribute, bool catchAbort
     }
     catch (RELEASE_CATCH_ALL)
     {
-        PrintLog("Unexpected exception caught");
+        IERRLOG("Unexpected exception caught");
         return NULL;
     }
 }

+ 2 - 2
ecl/hql/hqlmanifest.cpp

@@ -182,7 +182,7 @@ bool ResourceManifest::checkResourceFilesExist()
         const char *filepath = resources->query().queryProp("@originalFilename");
         if (!checkFileExists(filepath))
         {
-            ERRLOG("Error: RESOURCE file '%s' does not exist", filepath);
+            UERRLOG("Error: RESOURCE file '%s' does not exist", filepath);
             return false;
         }
     }
@@ -274,7 +274,7 @@ bool isManifestFileValid(const char *filename)
 {
     if (!checkFileExists(filename))
     {
-        ERRLOG("Error: MANIFEST file '%s' does not exist", filename);
+        UERRLOG("Error: MANIFEST file '%s' does not exist", filename);
         return false;
     }
     ResourceManifest manifest(filename);

+ 12 - 12
ecl/hql/hqlparse.cpp

@@ -348,7 +348,7 @@ void HqlLex::pushText(const char *s)
     inmacro->set_yyColumn(yyColumn);
 
 #if defined (TRACE_MACRO)
-    PrintLog("MACRO>> inmacro %p created for \"%s\" for macro parameters.\n",inmacro,s);
+    DBGLOG("MACRO>> inmacro %p created for \"%s\" for macro parameters.\n",inmacro,s);
 #endif
 }
 
@@ -415,7 +415,7 @@ void HqlLex::setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, Stri
                 }
             }
         }
-        //PrintLog("Set macro parm: %s", curParam.str());
+        //DBGLOG("Set macro parm: %s", curParam.str());
 //      if (macroParms->queryProp(formal->queryName()))
 //          reportError(errpos, ERR_NAMED_ALREADY_HAS_VALUE, "Parameter %s already has a value supplied", argumentName->str());
 //      else
@@ -550,7 +550,7 @@ void HqlLex::pushMacro(IHqlExpression *expr)
                         reportError(nextToken, ERR_PARAM_NODEFVALUE, "%s", msg.str());
                     }
                     macroParms->setProp(str(formal->queryName()), curParam.str());
-                    //PrintLog("Set macro parm: %s", curParam.str());
+                    //DBGLOG("Set macro parm: %s", curParam.str());
                     curParam.clear();
                 }
                 else
@@ -591,8 +591,8 @@ void HqlLex::pushMacro(IHqlExpression *expr)
         inmacro->setLegacyWhen(useLegacyWhen);
 
 #if defined(TRACE_MACRO)
-        PrintLog("MACRO>> inmacro %p created for \"%s\" at %d:%d\n",inmacro, s.str(),macroBodyExpr->getStartLine(),macroBodyExpr->getStartColumn());
-//      PrintLog("MACRO>> macro called at %d:%d\n", expr->getStartLine(),expr->getStartColumn());
+        DBGLOG("MACRO>> inmacro %p created for \"%s\" at %d:%d\n",inmacro, s.str(),macroBodyExpr->getStartLine(),macroBodyExpr->getStartColumn());
+//      DBGLOG("MACRO>> macro called at %d:%d\n", expr->getStartLine(),expr->getStartColumn());
 #endif
         /* set the lineno and column in the original source as the starting point */
         inmacro->yyLineNo = macroBodyExpr->getStartLine();
@@ -1179,7 +1179,7 @@ void HqlLex::doExport(YYSTYPE & returnToken, bool toXml)
         catch (...)
         {
             setXmlSymbol(returnToken, str(exportname), "", false);
-            PrintLog("Unexpected exception in doExport()");
+            IERRLOG("Unexpected exception in doExport()");
         }
         if (!more)
             break;
@@ -1487,7 +1487,7 @@ static bool isInModule(HqlLookupContext & ctx, const char* moduleName, const cha
     }
     catch (...)
     {
-        PrintLog("Unexpected exception in doInModule()");
+        IERRLOG("Unexpected exception in doInModule()");
     }
 
     return false;
@@ -1566,7 +1566,7 @@ void HqlLex::declareUniqueName(const char *name, const char * pattern)
     if (!added)
         uniqueName.append(++gUniqueId);
 
-    //PrintLog("Declaring unique name: %s",uniqueName.str());
+    //DBGLOG("Declaring unique name: %s",uniqueName.str());
     top->setValue(name,uniqueName.str());
 }
 
@@ -1607,7 +1607,7 @@ void HqlLex::doIsValid(YYSTYPE & returnToken)
     catch (...)
     {
         pushText("false");
-        PrintLog("Unexpected exception in doIsValid()");
+        IERRLOG("Unexpected exception in doIsValid()");
     }
 
     ::Release(expr);
@@ -2007,7 +2007,7 @@ static StringBuffer& mangle(IErrorReceiver* errReceiver,const char* src, StringB
                 if (de)
                 {
                     //errReceiver->reportError(returnToken, ERR_EXPECTED_CONST, "Bad parameter to #DEMANGLE", "CppTemplate");
-                    PrintLog("Bad parameter to #DEMANGLE");
+                    IERRLOG("Bad parameter to #DEMANGLE");
                     break;
                 }
                 else
@@ -2021,7 +2021,7 @@ static StringBuffer& mangle(IErrorReceiver* errReceiver,const char* src, StringB
             if (c != '_')
             {
                 //errReceiver->reportError(returnToken, ERR_EXPECTED_CONST, "Bad parameter to #DEMANGLE");
-                PrintLog("Bad parameter to #DEMANGLE");
+                IERRLOG("Bad parameter to #DEMANGLE");
                 break;
             }
             c = hexchar(finger[1])*16 + hexchar(finger[2]);
@@ -2433,7 +2433,7 @@ int HqlLex::yyLex(YYSTYPE & returnToken, bool lookup, const short * activeState)
             }
 
 #if defined(TRACE_MACRO)
-            PrintLog("MACRO>> inmacro %p deleted\n", inmacro);
+            DBGLOG("MACRO>> inmacro %p deleted\n", inmacro);
 #endif
 
             delete inmacro;

+ 2 - 2
ecl/hql/hqlstack.cpp

@@ -107,7 +107,7 @@ int FuncCallStack::push(ITypeInfo* argType, IHqlExpression* curParam)
         castParam.setown(paramValue->castTo(argType));
         if(!castParam)
         {
-            PrintLog("Failed to cast paramValue to argType in FuncCallStack::push");
+            IERRLOG("Failed to cast paramValue to argType in FuncCallStack::push");
             return -1;
         }
     }
@@ -159,7 +159,7 @@ int FuncCallStack::push(ITypeInfo* argType, IHqlExpression* curParam)
     case type_real:
 #ifdef MAXFPREGS
         if (numFpRegs==MAXFPREGS) {
-            PrintLog("Too many floating point registers needed in FuncCallStack::push");
+            IERRLOG("Too many floating point registers needed in FuncCallStack::push");
             return -1;
         }
         char tempbuf[sizeof(double)];

+ 3 - 3
ecl/hql/hqlthql.cpp

@@ -3441,7 +3441,7 @@ static StringBuffer &toECL(StringBuffer &s, HqltHql & hqlthql, HqlExprArray & qu
 #else
     catch(...)
     {
-        PrintLog("WARNING: toECL() threw an exception");
+        IERRLOG("toECL() threw an exception");
         s.setLength(startpos);
     }
 #endif
@@ -3473,7 +3473,7 @@ static StringBuffer &toECLDefinition(StringBuffer &s, HqltHql & hqlthql, HqlExpr
 #else
     catch(...)
     {
-        PrintLog("WARNING: toECLDefinition() threw an exception");
+        IERRLOG("toECLDefinition() threw an exception");
         s.setLength(startpos);
     }
 #endif
@@ -3543,7 +3543,7 @@ void splitECL(IHqlExpression * expr, StringBuffer &s, StringBuffer &d)
 #else
     catch(...)
     {
-        PrintLog("WARNING: toECL() threw an exception");
+        IERRLOG("toECL() threw an exception");
         s.setLength(startpos);
     }
 #endif

+ 3 - 3
ecl/hql/hqlutil.cpp

@@ -7657,7 +7657,7 @@ bool ErrorSeverityMapper::addMapping(const char * category, const char * value)
 {
     if (!category || !*category)
     {
-        ERRLOG("Error: No warning category supplied");
+        UERRLOG("Error: No warning category supplied");
         return false;
     }
 
@@ -7669,7 +7669,7 @@ bool ErrorSeverityMapper::addMapping(const char * category, const char * value)
     ErrorSeverity severity = getSeverity(action);
     if (severity == SeverityUnknown)
     {
-        ERRLOG("Error: Invalid warning severity '%s'", value);
+        UERRLOG("Error: Invalid warning severity '%s'", value);
         return false;
     }
 
@@ -7687,7 +7687,7 @@ bool ErrorSeverityMapper::addMapping(const char * category, const char * value)
         return true;
     }
 
-    ERRLOG("Error: Mapping doesn't specify a valid warning code or category '%s'", category);
+    UERRLOG("Error: Mapping doesn't specify a valid warning code or category '%s'", category);
     return false;
 }
 

+ 4 - 5
ecl/hqlcpp/hqlcpp.cpp

@@ -1472,8 +1472,7 @@ HqlCppTranslator::HqlCppTranslator(IErrorReceiver * _errors, const char * _soNam
             {
                 StringBuffer s;
                 errs.toString(s);
-                PrintLog("Parsing system scope: ");
-                PrintLog(s.str());
+                DBGLOG("Parsing system scope: %s", s.str());
             }
     #endif
         }
@@ -6211,7 +6210,7 @@ void HqlCppTranslator::doBuildCall(BuildCtx & ctx, const CHqlBoundTarget * tgt,
 
         if (arg >= maxArg)
         {
-            PrintLog("Too many parameters passed to function '%s'", str(expr->queryName()));
+            IERRLOG("Too many parameters passed to function '%s'", str(expr->queryName()));
             throwError1(HQLERR_TooManyParameters, str(expr->queryName()));
         }
 
@@ -6348,7 +6347,7 @@ void HqlCppTranslator::doBuildCall(BuildCtx & ctx, const CHqlBoundTarget * tgt,
     if (arg < maxArg)
     {
         //MORE: Process default parameters...
-        PrintLog("Not enough parameters passed to function '%s'", str(expr->queryName()));
+        IERRLOG("Not enough parameters passed to function '%s'", str(expr->queryName()));
         throwError1(HQLERR_TooFewParameters, str(expr->queryName()));
     }
 
@@ -6521,7 +6520,7 @@ void HqlCppTranslator::doBuildAssignCast(BuildCtx & ctx, const CHqlBoundTarget &
     left->queryType()->getECLType(s);
     target.queryType()->getECLType(s.append(" target="));
     expr->queryType()->getECLType(s.append(" expr="));
-    PrintLog(s.str());
+    DBGLOG("%s",s.str());
 #endif
 
     ITypeInfo * targetType = target.queryType();

+ 7 - 7
ecl/hqlcpp/hqlecl.cpp

@@ -167,7 +167,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         const char * lib = code->queryLibrary(idx);
         if (!lib)
             break;
-        PrintLog("Adding library: %s", lib);
+        LOG(MCuserInfo,"Adding library: %s", lib);
         addLibrary(lib);
         idx++;
     }
@@ -177,7 +177,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         const char * obj = code->queryObjectFile(idx);
         if (!obj)
             break;
-        PrintLog("Adding object file: %s", obj);
+        LOG(MCuserInfo,"Adding object file: %s", obj);
         objects.append(obj);
         idx++;
     }
@@ -187,7 +187,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         const char * src = code->querySourceFile(idx);
         if (!src)
             break;
-        PrintLog("Adding source file: %s", src);
+        LOG(MCuserInfo,"Adding source file: %s", src);
         sourceFiles.append(src);
         sourceFlags.append(code->querySourceFlags(idx));
         sourceIsTemp.append(code->querySourceIsTemp(idx));
@@ -199,7 +199,7 @@ void HqlDllGenerator::addLibrariesToCompiler()
         const char * dir = code->queryTempDirectory(idx);
         if (!dir)
             break;
-        PrintLog("Adding temporary directory: %s", dir);
+        LOG(MCuserInfo,"Adding temporary directory: %s", dir);
         temporaryDirectories.append(dir);
         idx++;
     }
@@ -610,12 +610,12 @@ bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
     if (okToAbort)
         compiler->setAbortChecker(this);
 
-    PrintLog("Compiling %s", wuname);
+    LOG(MCuserInfo,"Compiling %s", wuname);
     bool ok = compiler->compile();
     if(ok)
-        PrintLog("Compiled %s", wuname);
+        LOG(MCuserInfo,"Compiled %s", wuname);
     else
-        PrintLog("Failed to compile %s", wuname);
+        UERRLOG("Failed to compile %s", wuname);
 
     bool reportCppWarnings = wu->getDebugValueBool("reportCppWarnings", false);
     IArrayOf<IError> errors;

+ 10 - 10
ecl/hqlcpp/hqlhtcpp.cpp

@@ -805,14 +805,14 @@ static IHqlExpression * getExtractMatchingAssign(HqlExprArray & assigns, IHqlExp
     {
         IHqlExpression & assign = assigns.item(idx);
 #ifdef TRACE_ASSIGN_MATCH
-        PrintLog("Next comparison:");
+        DBGLOG("Next comparison:");
         x.clear().append("target(").append((unsigned)assign.queryChild(0)->queryChild(0)).append(":");
         x.appendf("%p", assign.queryChild(0)->queryChild(1)).append(")   ");
         assign.queryChild(0)->toString(x);
-        PrintLog(x.str());
+        DBGLOG("%s", x.str());
         x.clear().append("search(").appendf("%p", search).append(")   ");
         search->toString(x);
-        PrintLog(x.str());
+        DBGLOG("%s",x.str());
 #endif
         IHqlExpression * lhs = assign.queryChild(0);
         IHqlExpression * candidateField = lhs->queryChild(1);
@@ -2847,16 +2847,16 @@ IReferenceSelector * DatasetSelector::select(BuildCtx & ctx, IHqlExpression * se
             unsigned numFields = record->numChildren();
             unsigned idxc;
             StringBuffer fields;
-            PrintLog("Fields:");
+            DBGLOG("Fields:");
             for (idxc = 0; idxc < numFields; idxc++)
             {
                 IHqlExpression * field = record->queryChild(idxc);
                 IAtom * name = field->queryName();
                 fields.clear();
                 fields.appendf("        %20s [@%lx := %lx] ", name->str(), field, field->queryChild(0));
-                PrintLog(fields.str());
+                DBGLOG("%s",fields.str());
             }
-            PrintLog("Search: %20s [@%lx])", selectedField->queryName()->str(),selectedField);
+            DBGLOG("Search: %20s [@%lx])", selectedField->queryName()->str(),selectedField);
 #endif
 
             StringBuffer searchName, datasetName;
@@ -5061,7 +5061,7 @@ void HqlCppTranslator::buildGetResultInfo(BuildCtx & ctx, IHqlExpression * expr,
         }
     case type_row:      UNIMPLEMENTED; break; //should be translated to rawData.
     default:
-        PrintLog("%d", ttc);
+        DBGLOG("%d", ttc);
         throwUnexpectedX("No getResult defined for this type");
         break;
     }
@@ -5354,7 +5354,7 @@ void HqlCppTranslator::buildSetResultInfo(BuildCtx & ctx, IHqlExpression * origi
         }
         //fall through
     default:
-        PrintLog("%d", retType);
+        DBGLOG("%d", retType);
         throwError(HQLERR_InvalidSetResultType);
     }
 
@@ -9006,7 +9006,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityEmbed(BuildCtx & ctx, IHqlExpr
 void HqlCppTranslator::doBuildStmtUpdate(BuildCtx & ctx, IHqlExpression * expr)
 {
     // MJH - CODE TO DO UPDATE GOES HERE
-    PrintLog("in HqlCppTranslator::doBuildStmtUpdate()");
+    DBGLOG("in HqlCppTranslator::doBuildStmtUpdate()");
 }
 
 
@@ -19212,7 +19212,7 @@ void HqlCppTranslator::traceExpressions(const char * title, WorkflowArray & work
 {
     checkAbort();
 
-    // PrintLog(title);
+    // DBGLOG("%s",title);
     LOG(MCdebugInfo(200), unknownJob, "Tracing expressions: %s", title);
     static LogMsgCategory debug500 = MCdebugInfo(500);
     static LogMsgCategory debug5000 = MCdebugInfo(5000);

+ 1 - 1
ecl/hqlcpp/hqlres.cpp

@@ -509,7 +509,7 @@ void ResourceManager::flushAsText(const char *filename)
     FILE* f = fopen(name.str(), "wb");
     if (f==NULL)
     {
-        PrintLog("Create resource text file %s failed", name.str());
+        IERRLOG("Create resource text file %s failed", name.str());
         return; // error is ignorable.
     }
 

+ 3 - 3
ecl/hqlcpp/hqlresource.cpp

@@ -2216,7 +2216,7 @@ bool ResourceGraphLink::isRedundantLink()
 void ResourceGraphLink::trace(const char * name)
 {
 #ifdef TRACE_RESOURCING
-    PrintLog("%s: %lx source(%lx,%lx) sink(%lx,%lx) %s", name, this, sourceGraph.get(), sourceNode->queryBody(), sinkGraph.get(), sinkNode ? sinkNode->queryBody() : NULL,
+    IERRLOG("%s: %lx source(%lx,%lx) sink(%lx,%lx) %s", name, this, sourceGraph.get(), sourceNode->queryBody(), sinkGraph.get(), sinkNode ? sinkNode->queryBody() : NULL,
              linkKind == SequenceLink ? "sequence" : "");
 #endif
 }
@@ -2546,7 +2546,7 @@ void ResourceGraphInfo::mergeGraph(ResourceGraphInfo & other, bool mergeConditio
     DBGLOG("Merging%s source into%s sink", other.isUnconditional ? "" : " conditional", isUnconditional ? "" : " conditional");
     other.display();
     display();
-    PrintLog("Merge %p into %p", &other, this);
+    DBGLOG("Merge %p into %p", &other, this);
 #endif
 
     if (other.hasConditionSource)
@@ -3623,7 +3623,7 @@ ResourceGraphInfo * EclResourcer::createGraph()
 {
     ResourceGraphInfo * graph = new ResourceGraphInfo(&options);
     graphs.append(*LINK(graph));
-    //PrintLog("Create graph %p", graph);
+    //DBGLOG("Create graph %p", graph);
     return graph;
 }
 

+ 1 - 1
ecl/hqlcpp/hqlsource.cpp

@@ -55,7 +55,7 @@
 //#define FLATTEN_DATASETS
 //#define HACK_TO_IGNORE_TABLE
 
-//#define TraceExprPrintLog(x, expr)                PrintLog(x ": %s", expr->toString(StringBuffer()).str());
+//#define TraceExprPrintLog(x, expr)                DBGLOG(x ": %s", expr->toString(StringBuffer()).str());
 #define TraceExprPrintLog(x, expr)              
 //#define TraceTableFields
 

+ 1 - 1
ecl/hqlcpp/hqltcppc.cpp

@@ -45,7 +45,7 @@
 
 #define LIMIT_FOR_GET       (NULL)
 
-//#define TraceExprPrintLog(x, expr)                PrintLog(x ": %s", expr->toString(StringBuffer()).str());
+//#define TraceExprPrintLog(x, expr)                DBGLOG(x ": %s", expr->toString(StringBuffer()).str());
 
 static void normalizeAdditions(IHqlExpression * expr, HqlExprAttr & var, HqlExprAttr & fixed)
 {

+ 1 - 1
ecl/hqlcpp/hqltcppc2.cpp

@@ -41,7 +41,7 @@
 #include "hqlattr.hpp"
 #include "hqlusage.hpp"
 
-//#define TraceExprPrintLog(x, expr)                PrintLog(x ": %s", expr->toString(StringBuffer()).str());
+//#define TraceExprPrintLog(x, expr)                DBGLOG(x ": %s", expr->toString(StringBuffer()).str());
 
 //---------------------------------------------------------------------------
 CChildSetColumnInfo::CChildSetColumnInfo(CContainerInfo * _container, CMemberInfo * _prior, IHqlExpression * _column) : CColumnInfo(_container, _prior, _column)

+ 6 - 6
ecl/hthor/hthor.cpp

@@ -451,7 +451,7 @@ void CHThorDiskWriteActivity::resolve()
                 if(extend)
                     agent.logFileAccess(f->queryDistributedFile(), "HThor", "EXTENDED");
                 else if(overwrite) {
-                    PrintLog("Removing %s from DFS", lfn.str());
+                    LOG(MCoperatorInfo, "Removing %s from DFS", lfn.str());
                     agent.logFileAccess(f->queryDistributedFile(), "HThor", "DELETED");
                     if (!agent.queryResolveFilesLocally())
                         f->queryDistributedFile()->detach();
@@ -1050,7 +1050,7 @@ CHThorIndexWriteActivity::CHThorIndexWriteActivity(IAgentContext &_agent, unsign
         {
             if (TIWoverwrite & helper.getFlags()) 
             {
-                PrintLog("Removing %s from DFS", lfn.str());
+                LOG(MCuserInfo, "Removing %s from DFS", lfn.str());
                 agent.logFileAccess(f, "HThor", "DELETED");
                 f->detach();
             }
@@ -8156,7 +8156,7 @@ void CHThorDiskReadBaseActivity::resolve()
         {
             StringBuffer buff;
             buff.appendf("Input file '%s' was missing but declared optional", mangledHelperFileName.str());
-            WARNLOG("%s", buff.str());
+            UWARNLOG("%s", buff.str());
             agent.addWuException(buff.str(), WRN_SkipMissingOptFile, SeverityInformation, "hthor");
         }
     }
@@ -8173,7 +8173,7 @@ void CHThorDiskReadBaseActivity::gatherInfo(IFileDescriptor * fileDesc)
             {
                 StringBuffer msg;
                 msg.append("DFS and code generated group info. differs: DFS(").append(grouped ? "grouped" : "ungrouped").append("), CodeGen(").append(grouped ? "ungrouped" : "grouped").append("), using DFS info");
-                WARNLOG("%s", msg.str());
+                UWARNLOG("%s", msg.str());
                 agent.addWuException(msg.str(), WRN_MismatchGroupInfo, SeverityError, "hthor");
             }
         }
@@ -8198,7 +8198,7 @@ void CHThorDiskReadBaseActivity::gatherInfo(IFileDescriptor * fileDesc)
             {
                 StringBuffer msg;
                 msg.append("Ignoring compression attribute on file ").append(mangledHelperFileName.str()).append(", which is not published as compressed");
-                WARNLOG("%s", msg.str());
+                UWARNLOG("%s", msg.str());
                 agent.addWuException(msg.str(), WRN_MismatchCompressInfo, SeverityWarning, "hthor");
                 compressed = true;
             }
@@ -8487,7 +8487,7 @@ bool CHThorDiskReadBaseActivity::openNext()
         {
             closepart();
             StringBuffer msg;
-            WARNLOG("%s", E->errorMessage(msg).str());
+            IWARNLOG("%s", E->errorMessage(msg).str());
             if (saveOpenExc.get())
                 E->Release();
             else

+ 1 - 1
ecl/hthor/hthor.ipp

@@ -161,7 +161,7 @@ static bool verifyFormatCrc(unsigned helperCrc, IDistributedFile * df, char cons
                 msg.append(" (in super").append(isIndex ? "index" : "file").append(" ").append(super).append(")");
             if(fail)
                 throw MakeStringException(0, "%s", msg.str());
-            WARNLOG("%s", msg.str());
+            UWARNLOG("%s", msg.str());
             //MORE: Should we add a warning, similar to the following:
             //agent.addWuException(msg.str(), WRN_UseLayoutTranslation, SeverityWarning, "hthor");
             return false;

+ 8 - 8
ecl/hthor/hthorkey.cpp

@@ -1093,7 +1093,7 @@ extern HTHOR_API IHThorActivity *createIndexReadActivity(IAgentContext &_agent,
     {
         StringBuffer buff;
         buff.append("Skipping OPT index read of nonexistent file ").append(lfn);
-        WARNLOG("%s", buff.str());
+        UWARNLOG("%s", buff.str());
         _agent.addWuException(buff.str(), WRN_SkipMissingOptIndex, SeverityInformation, "hthor");
         return new CHThorNullActivity(_agent, _activityId, _subgraphId, arg, _kind);
     }
@@ -1276,7 +1276,7 @@ extern HTHOR_API IHThorActivity *createIndexNormalizeActivity(IAgentContext &_ag
     {
         StringBuffer buff;
         buff.append("Skipping OPT index normalize of nonexistent file ").append(lfn);
-        WARNLOG("%s", buff.str());
+        UWARNLOG("%s", buff.str());
         _agent.addWuException(buff.str(), WRN_SkipMissingOptIndex, SeverityInformation, "hthor");
         return new CHThorNullActivity(_agent, _activityId, _subgraphId, arg, _kind);
     }
@@ -1394,7 +1394,7 @@ extern HTHOR_API IHThorActivity *createIndexAggregateActivity(IAgentContext &_ag
     {
         StringBuffer buff;
         buff.append("Skipping OPT index aggregate of nonexistent file ").append(lfn);
-        WARNLOG("%s", buff.str());
+        UWARNLOG("%s", buff.str());
         _agent.addWuException(buff.str(), WRN_SkipMissingOptIndex, SeverityInformation, "hthor");
         return new CHThorNullAggregateActivity(_agent, _activityId, _subgraphId, arg, arg, _kind);
     }
@@ -1500,7 +1500,7 @@ extern HTHOR_API IHThorActivity *createIndexCountActivity(IAgentContext &_agent,
     {
         StringBuffer buff;
         buff.append("Skipping OPT index count of nonexistent file ").append(lfn);
-        WARNLOG("%s", buff.str());
+        UWARNLOG("%s", buff.str());
         _agent.addWuException(buff.str(), WRN_SkipMissingOptIndex, SeverityInformation, "hthor");
         return new CHThorNullCountActivity(_agent, _activityId, _subgraphId, arg, _kind);
     }
@@ -1612,7 +1612,7 @@ extern HTHOR_API IHThorActivity *createIndexGroupAggregateActivity(IAgentContext
     {
         StringBuffer buff;
         buff.append("Skipping OPT index group aggregate of nonexistent file ").append(lfn);
-        WARNLOG("%s", buff.str());
+        UWARNLOG("%s", buff.str());
         _agent.addWuException(buff.str(), WRN_SkipMissingOptIndex, SeverityInformation, "hthor");
         return new CHThorNullActivity(_agent, _activityId, _subgraphId, arg, _kind);
     }
@@ -2231,7 +2231,7 @@ public:
             {
                 StringBuffer buff;
                 buff.append("Skipping OPT fetch of nonexistent file ").append(lfn);
-                WARNLOG("%s", buff.str());
+                UWARNLOG("%s", buff.str());
                 agent.addWuException(buff.str(), WRN_SkipMissingOptFile, SeverityInformation, "hthor");
             }
         }
@@ -2553,7 +2553,7 @@ public:
         {
             StringBuffer buff;
             buff.append("Skipping OPT fetch of nonexistent file ").append(lfn);
-            WARNLOG("%s", buff.str());
+            UWARNLOG("%s", buff.str());
             agent.addWuException(buff.str(), WRN_SkipMissingOptFile, SeverityInformation, "hthor");
         }
             
@@ -4001,7 +4001,7 @@ public:
         {
             StringBuffer buff;
             buff.append("Skipping OPT keyed join against nonexistent file ").append(lfn);
-            WARNLOG("%s", buff.str());
+            UWARNLOG("%s", buff.str());
             agent.addWuException(buff.str(), WRN_SkipMissingOptFile, SeverityInformation, "hthor");
         }
         CHThorThreadedActivityBase::start();

+ 1 - 1
ecl/scheduleadmin/scheduleadmin.cpp

@@ -145,7 +145,7 @@ public:
         printf("...done\n");
     }
 
-    virtual bool fireException(IException *e) { StringBuffer msg; ERRLOG("Scheduler error (skipping event): %d: %s", e->errorCode(), e->errorMessage(msg).str()); e->Release(); return true; }
+    virtual bool fireException(IException *e) { StringBuffer msg; IERRLOG("Scheduler error (skipping event): %d: %s", e->errorCode(), e->errorMessage(msg).str()); e->Release(); return true; }
 private:
     StringAttr serverName;
 };

+ 1 - 1
ecl/schedulectrl/eventqueue.cpp

@@ -211,7 +211,7 @@ public:
         PROGLOG("Scheduler[%s]: received event [%s/%s] @%s", serverName.get(), name.get(), text.get(), target.get());
         if(strcmp(name.get(), "CRON")==0)
         {
-            WARNLOG("Scheduler[%s]: Unexpectedly got external CRON event (ignoring)", serverName.get());
+            OWARNLOG("Scheduler[%s]: Unexpectedly got external CRON event (ignoring)", serverName.get());
             return;
         }
         bool checkWuid = (target && *target);

+ 1 - 1
ecl/wutest/wujobqtest.cpp

@@ -475,7 +475,7 @@ static void cmd_activity(IJobQueue *queue,const char *qname)
     xpath.appendf("Server[@queue=\"%s\"]/WorkUnit",qname);
     Owned<IRemoteConnection> conn = querySDS().connect("Status/Servers", myProcessSession(), 0, 100000);
     if (!conn) {
-        ERRLOG("cannot connect to Status/Servers");
+        OERRLOG("cannot connect to Status/Servers");
         return;
     }
     for (;;) {