Jelajahi Sumber

Merge pull request #12202 from shamser/issue21518

HPCC-21518 DALI - Make sure audience and message class is sensible

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 tahun lalu
induk
melakukan
7917da991c

+ 1 - 1
dali/base/daaudit.cpp

@@ -161,7 +161,7 @@ public:
             if (!fio) {
                 StringBuffer fn;
                 files->getName(fn);
-                WARNLOG("Could not open %s",fn.str());
+                OWARNLOG("Could not open %s",fn.str());
                 continue;
             }
             bool eof=false;

+ 1 - 1
dali/base/daclient.cpp

@@ -300,7 +300,7 @@ bool updateDaliEnv(IPropertyTree *env, bool forceGroupUpdate, const char *daliIp
     else
         ret = false;
     if (response.length())
-        WARNLOG("%s", response.str());
+        UWARNLOG("%s", response.str());
 
     closedownClientProcess();
     return ret;

+ 2 - 2
dali/base/dacoven.cpp

@@ -424,7 +424,7 @@ protected:
             stop();
             break;
         default:
-            ERRLOG("Unknown coven command request"); //MORE: I think this should be a user error?
+            UERRLOG("Unknown coven command request");
             mb.clear();
             coven.reply(mb);
             break;
@@ -614,7 +614,7 @@ public:
                 next++;
                 if (!next) {
                     next++;
-                    ERRLOG("Unique ID overflow!!"); //unlikely to happen in my lifetime
+                    IERRLOG("Unique ID overflow!!"); //unlikely to happen in my lifetime
                 }
                 store->setPropInt("UIDbase",(int)next);
                 updateDataStore();

+ 4 - 4
dali/base/dacsds.cpp

@@ -46,7 +46,7 @@ static CriticalSection SDScrit;
 #define CHECK_CONNECTED(XSTR)                                                                                        \
     if (!connected)                                                                                                   \
     {                                                                                                               \
-        LOG(MCerror, unknownJob, XSTR": Closed connection (xpath=%s, sessionId=%" I64F "d)", xpath.get(), sessionId);       \
+        IERRLOG(XSTR": Closed connection (xpath=%s, sessionId=%" I64F "d)", xpath.get(), sessionId);                 \
         return;                                                                                                     \
     }
 
@@ -1291,7 +1291,7 @@ bool CClientSDSManager::sendRequest(CMessageBuffer &mb, bool throttle)
     {
         bool avail = concurrentRequests.wait(clientThrottleDelay);
         if (!avail)
-            WARNLOG("Excessive concurrent Dali SDS client transactions. Transaction delayed.");
+            OWARNLOG("Excessive concurrent Dali SDS client transactions. Transaction delayed.");
         bool res;
         try { res = queryCoven().sendRecv(mb, RANK_RANDOM, MPTAG_DALI_SDS_REQUEST); }
         catch (IException *)
@@ -1601,7 +1601,7 @@ void CClientSDSManager::commit(CRemoteConnection &connection, bool *disconnectDe
             if (DCERR_server_closed == e->errorCode())
             {
                 if (changes)
-                    WARNLOG("Dali server disconnect, failed to commit data");
+                    IWARNLOG("Dali server disconnect, failed to commit data");
                 e->Release();
                 if (disconnectDeleteRoot)
                     noteDisconnected(connection);
@@ -2110,7 +2110,7 @@ void CClientSDSManager::setConfigOpt(const char *opt, const char *value)
                 {
                     // generally won't be waiting, as would expect this option to typically be called just after component startup time.
                     if (!concurrentRequests.wait(clientThrottleDelay))
-                        WARNLOG("Waiting on active requests to lower clientThrottleLimit");
+                        IWARNLOG("Waiting on active requests to lower clientThrottleLimit");
                     else
                     {
                         ++c;

+ 38 - 38
dali/base/dadfs.cpp

@@ -177,7 +177,7 @@ RemoteFilename &constructPartFilename(IGroup *grp,unsigned partno,unsigned partm
     if (!name||!*name) {
         if (!partmask||!*partmask) {
             partmask = "!ERROR!._$P$_of_$N$"; // could use logical tail name if I had it
-            ERRLOG("No partmask for constructPartFilename");
+            IERRLOG("No partmask for constructPartFilename");
         }
         name = expandMask(tmp,partmask,partno,partmax).str();
     }
@@ -307,7 +307,7 @@ public:
                     unsigned tt = msTick()-start;
                     if (timeout!=INFINITE)
                         throw;
-                    WARNLOG("CConnectLock on %s waiting for %ds",name,tt/1000);
+                    IWARNLOG("CConnectLock on %s waiting for %ds",name,tt/1000);
                     if (first)
                     {
                         PrintStackReport();
@@ -442,7 +442,7 @@ protected:
             {
                 if (SDSExcpt_LockTimeout != e->errorCode() || tm.timedout())
                     throw;
-                WARNLOG("CFileAttrLockBase(%s) blocked for %ds", msg, tm.elapsed()/1000);
+                IWARNLOG("CFileAttrLockBase(%s) blocked for %ds", msg, tm.elapsed()/1000);
                 e->Release();
             }
         }
@@ -925,7 +925,7 @@ public:
             const char *cls = clustlist.item(ci);
             Owned<IGroup> grp = queryNamedGroupStore().lookup(cls);
             if (!grp) {
-                ERRLOG("IDistributedFile::setPreferred - cannot find cluster %s",cls);
+                IERRLOG("IDistributedFile::setPreferred - cannot find cluster %s",cls);
                 return;
             }
             if (!firstgrp.get())
@@ -1236,7 +1236,7 @@ static void setUserDescriptor(Linked<IUserDescriptor> &udesc,IUserDescriptor *us
             user->getUserName(sb);
         if (sb.length()==0)
         {
-            DBGLOG("UNEXPECTED USER (NULL) in dadfs.cpp setUserDescriptor() %d",__LINE__);
+            IERRLOG("UNEXPECTED USER (NULL) in dadfs.cpp setUserDescriptor() %d",__LINE__);
             //following debug code to be removed
             PrintStackReport();
         }
@@ -1254,7 +1254,7 @@ static SecAccessFlags getScopePermissions(const char *scopename,IUserDescriptor
         if (!user)
         {
 #ifdef NULL_DALIUSER_STACKTRACE
-            DBGLOG("UNEXPECTED USER (NULL) in dadfs.cpp getScopePermissions() line %d",__LINE__);
+            IERRLOG("UNEXPECTED USER (NULL) in dadfs.cpp getScopePermissions() line %d",__LINE__);
             //following debug code to be removed
             PrintStackReport();
 #endif
@@ -1292,7 +1292,7 @@ static void checkLogicalScope(const char *scopename,IUserDescriptor *user,bool r
 #ifdef NULL_DALIUSER_STACKTRACE
     if (!user)
     {
-        DBGLOG("UNEXPECTED USER (NULL) in dadfs.cpp checkLogicalScope() line %d",__LINE__);
+        IERRLOG("UNEXPECTED USER (NULL) in dadfs.cpp checkLogicalScope() line %d",__LINE__);
         PrintStackReport();
     }
 #endif
@@ -2603,7 +2603,7 @@ public:
 inline void dfCheckRoot(const char *trc,Owned<IPropertyTree> &root,IRemoteConnection *conn)
 {
     if (root.get()!=conn->queryRoot()) {
-        WARNLOG("%s - root changed",trc);
+        DBGLOG("%s - root changed",trc);
 #ifdef _DEBUG
         PrintStackReport();
 #endif
@@ -3000,7 +3000,7 @@ public:
                 dfCheckRoot("setProtect.1",root,conn);
             }
             else
-                ERRLOG("setProtect - cannot protect %s (no connection in file)",owner?owner:"");
+                IERRLOG("setProtect - cannot protect %s (no connection in file)",owner?owner:"");
         }
     }
 
@@ -3108,7 +3108,7 @@ public:
                 t.setown(addNamedPropTree(root,"SuperOwner","@name",superfile));
         }
         else
-            ERRLOG("linkSuperOwner - cannot link to %s (no connection in file)",superfile);
+            IERRLOG("linkSuperOwner - cannot link to %s (no connection in file)",superfile);
     }
 
     void setAccessed()
@@ -3532,13 +3532,13 @@ public:
 #endif
 
                 if (!cluster.queryGroup(&queryNamedGroupStore())) {
-                    ERRLOG("IDistributedFileDescriptor cannot set cluster for %s",logicalName.get());
+                    IERRLOG("IDistributedFileDescriptor cannot set cluster for %s",logicalName.get());
                 }
                 clusters.append(cluster);
             }
         }
         else
-            ERRLOG("No cluster specified for %s",logicalName.get());
+            IERRLOG("No cluster specified for %s",logicalName.get());
     }
 
     virtual unsigned numClusters() override
@@ -3605,7 +3605,7 @@ public:
                     }
                 }
                 else
-                    WARNLOG("CFileClusterOwner::saveClusters - empty cluster");
+                    DBGLOG("CFileClusterOwner::saveClusters - empty cluster");
             }
             if (grplist.length())
                 t->setProp("@group",grplist.str());
@@ -4233,7 +4233,7 @@ public:
                 else {
                     StringBuffer s;
                     oldrfn.getRemotePath(s);
-                    WARNLOG("renamePhysicalPartFiles: %s doesn't exist",s.str());
+                    DBGLOG("renamePhysicalPartFiles: %s doesn't exist",s.str());
                     return true;
                 }
                 Owned<IFile> dest = createIFile(newrfn);
@@ -4719,7 +4719,7 @@ class CDistributedSuperFile: public CDistributedFileBase<IDistributedSuperFile>
                 }
                 if (!transaction->isSubFile(parent, subfile, true))
                 {
-                    WARNLOG("removeSubFile: File %s is not a subfile of %s", subfile.get(), parent->queryLogicalName());
+                    IWARNLOG("removeSubFile: File %s is not a subfile of %s", subfile.get(), parent->queryLogicalName());
                     parent.clear();
                     sub.clear();
                     return true; // NB: sub was not a member of super, issue warning and continue without locking
@@ -5057,7 +5057,7 @@ protected:
                     cdfsl.set(subname);
                     if (cdfsl.isForeign())
                     {
-                        WARNLOG("CDistributedSuperFile: SuperFile %s's sub-file file '%s' is foreign, but missing", logicalName.get(), subname.str());
+                        IWARNLOG("CDistributedSuperFile: SuperFile %s's sub-file file '%s' is foreign, but missing", logicalName.get(), subname.str());
                         // Create a dummy empty superfile as a placeholder for the missing foreign file
                         Owned<IPropertyTree> dummySuperRoot = createPTree();
                         dummySuperRoot->setPropInt("@interleaved", 0);
@@ -5078,7 +5078,7 @@ protected:
             // This is *only* due to foreign files
             if (subfiles.ordinality() != n)
             {
-                WARNLOG("CDistributedSuperFile: SuperFile %s's number of sub-files updated to %d", logicalName.get(), subfiles.ordinality());
+                IWARNLOG("CDistributedSuperFile: SuperFile %s's number of sub-files updated to %d", logicalName.get(), subfiles.ordinality());
                 root->setPropInt("@numsubfiles", subfiles.ordinality());
             }
         }
@@ -5416,7 +5416,7 @@ public:
         // need common attributes
         Owned<ISuperFileDescriptor> fdesc=createSuperFileDescriptor(at.getClear());
         if (interleaved&&(interleaved!=2))
-            WARNLOG("getFileDescriptor: Unsupported interleave value (1)");
+            IWARNLOG("getFileDescriptor: Unsupported interleave value (1)");
         fdesc->setSubMapping(subcounts,interleaved!=0);
         fdesc->setTraceName(logicalName.get());
         Owned<IDistributedFilePartIterator> iter = getIterator(NULL);
@@ -6522,12 +6522,12 @@ CDistributedFilePart::CDistributedFilePart(CDistributedFile &_parent,unsigned _p
     dirty = false;
     if (pd) {
         if (pd->isMulti())
-            ERRLOG("Multi filenames not supported in Dali DFS Part %d of %s",_part+1,_parent.queryLogicalName());
+            IERRLOG("Multi filenames not supported in Dali DFS Part %d of %s",_part+1,_parent.queryLogicalName());
         overridename.set(pd->queryOverrideName());
         setAttr(*pd->getProperties());
     }
     else
-        ERRLOG("CDistributedFilePart::CDistributedFilePart no IPartDescriptor for part");
+        IERRLOG("CDistributedFilePart::CDistributedFilePart no IPartDescriptor for part");
 }
 
 void CDistributedFilePart::Link(void) const
@@ -6592,7 +6592,7 @@ StringBuffer & CDistributedFilePart::getPartName(StringBuffer &partname)
     const char *mask=parent.queryPartMask();
     if (!mask||!*mask) {
         const char *err ="CDistributedFilePart::getPartName cannot determine part name (no mask)";
-        ERRLOG("%s", err);
+        IERRLOG("%s", err);
         throw MakeStringExceptionDirect(-1, err);
     }
     expandMask(partname,mask,partIndex,parent.numParts());
@@ -6654,7 +6654,7 @@ StringBuffer &CDistributedFilePart::getPartDirectory(StringBuffer &ret,unsigned
             dir.append(defdir);
     }
     if (dir.length()==0)
-        ERRLOG("IDistributedFilePart::getPartDirectory unable to determine part directory");
+        IERRLOG("IDistributedFilePart::getPartDirectory unable to determine part directory");
     else {
         parent.adjustClusterDir(partIndex,copy,dir);
         ret.append(dir);
@@ -6688,7 +6688,7 @@ IPropertyTree &CDistributedFilePart::queryAttributes()
     CriticalBlock block (sect);     // avoid nested blocks
     if (attr)
         return *attr;
-    WARNLOG("CDistributedFilePart::queryAttributes missing part attributes");
+    DBGLOG("CDistributedFilePart::queryAttributes missing part attributes");
     attr.setown(getEmptyAttr());
     return *attr;
 }
@@ -8149,7 +8149,7 @@ bool CDistributedFileDirectory::removeEntry(const char *name, IUserDescriptor *u
         StringBuffer msg(logicalname.get());
         msg.append(" - cause: ");
         e->errorMessage(msg);
-        ERRLOG("%s", msg.str());
+        IERRLOG("%s", msg.str());
         if (throwException)
             throw new CDFS_Exception(DFSERR_FailedToDeleteFile, msg.str());
         e->Release();
@@ -9274,7 +9274,7 @@ class CInitGroups
                 CMachineEntryPtr *m = machinemap.getValue(computer);
                 if (!m)
                 {
-                    ERRLOG("Cannot construct %s, computer name %s not found\n", cluster.queryProp("@name"), computer);
+                    OERRLOG("Cannot construct %s, computer name %s not found\n", cluster.queryProp("@name"), computer);
                     return NULL;
                 }
                 ep.set((*m)->ep);
@@ -9285,7 +9285,7 @@ class CInitGroups
             }
             else
             {
-                ERRLOG("Cannot construct %s, missing computer spec on node\n", cluster.queryProp("@name"));
+                OERRLOG("Cannot construct %s, missing computer spec on node\n", cluster.queryProp("@name"));
                 return NULL;
             }
             switch (groupType)
@@ -9332,7 +9332,7 @@ class CInitGroups
         //GH->JCS This can't be changed to use getEnvironmentFactory() unless that moved inside dalibase;
         Owned<IRemoteConnection> conn = querySDS().connect("/Environment/Hardware", myProcessSession(), RTM_LOCK_READ, SDS_CONNECT_TIMEOUT);
         if (!conn) {
-            WARNLOG("Cannot connect to /Environment/Hardware");
+            IWARNLOG("Cannot connect to /Environment/Hardware");
             return false;
         }
         IPropertyTree* root = conn->queryRoot();
@@ -9446,14 +9446,14 @@ class CInitGroups
             if (force)
             {
                 VStringBuffer msg("Forcing new group layout for %s [ matched active = false, matched old environment = %s ]", gname.str(), matchOldEnv?"true":"false");
-                WARNLOG("%s", msg.str());
+                UWARNLOG("%s", msg.str());
                 messages.append(msg).newline();
                 matchOldEnv = false;
             }
             else
             {
                 VStringBuffer msg("Active cluster '%s' group layout does not match environment [matched old environment=%s]", gname.str(), matchOldEnv?"true":"false");
-                LOG(MCoperatorWarning, unknownJob, "%s", msg.str());                                                                        \
+                UWARNLOG("%s", msg.str());                                                                        \
                 messages.append(msg).newline();
                 if (existingClusterGroup)
                 {
@@ -9465,7 +9465,7 @@ class CInitGroups
         if ((!existingClusterGroup && (grp_thorspares != groupType)) || (!matchExisting && !matchOldEnv))
         {
             VStringBuffer msg("New cluster layout for cluster %s", gname.str());
-            WARNLOG("%s", msg.str());
+            UWARNLOG("%s", msg.str());
             messages.append(msg).newline();
             addClusterGroup(gname.str(), newClusterGroup.getClear(), realCluster);
             return true;
@@ -9528,7 +9528,7 @@ public:
             clusters.setown(root->getElements(xpath.str()));
             if (!clusters || !clusters->first()) {
                 VStringBuffer errMsg("Could not find type %s, %s cluster", type, clusterName.get());
-                WARNLOG("%s", errMsg.str());
+                UWARNLOG("%s", errMsg.str());
                 messages.append(errMsg).newline();
                 ret = false;
             }
@@ -9565,7 +9565,7 @@ public:
                                 if (eps->zap(ep)) {
                                     StringBuffer epStr;
                                     VStringBuffer errMsg("addSpares: not adding: %s, already in spares", ep.getUrlStr(epStr).str());
-                                    WARNLOG("%s", errMsg.str());
+                                    UWARNLOG("%s", errMsg.str());
                                     messages.append(errMsg).newline();
                                     while (eps->zap(ep)); // delete any other duplicates
                                 }
@@ -9603,7 +9603,7 @@ public:
                                 VStringBuffer xpath("Node[@ip=\"%s\"]", ipStr.str());
                                 if (!existing->removeProp(xpath.str())) {
                                     VStringBuffer errMsg("removeSpares: %s not found in spares", ipStr.str());
-                                    WARNLOG("%s", errMsg.str());
+                                    UWARNLOG("%s", errMsg.str());
                                     messages.append(errMsg).newline();
                                     while (eps->zap(ep)); // delete any other duplicates
                                 }
@@ -9616,7 +9616,7 @@ public:
                 }
                 if (clusters->next()) {
                     VStringBuffer errMsg("resetThorGroup: more than one cluster named: %s", clusterName.get());
-                    WARNLOG("%s", errMsg.str());
+                    UWARNLOG("%s", errMsg.str());
                     messages.append(errMsg).newline();
                     ret = false;
                 }
@@ -10843,10 +10843,10 @@ bool removePhysicalFiles(IGroup *grp,const char *_filemask,unsigned short port,C
                         PROGLOG("Removed '%s'",partfile->queryFilename());
                         unsigned t = msTick()-start;
                         if (t>5*1000)
-                            LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000);
+                            DBGLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000);
                     }
                     else
-                        LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
+                        IWARNLOG("Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
 #else
                     if (partfile->exists())
                         PROGLOG("Would remove '%s'",partfile->queryFilename());
@@ -11381,7 +11381,7 @@ class CLightWeightSuperFileConn: implements ISimpleSuperFileEnquiry, public CInt
                     if (SDSExcpt_LockTimeout != e->errorCode())
                         throw;
                     e->Release();
-                    WARNLOG("migrateSuperOwnersAttr: Could not lock parent %s",query.str());
+                    IWARNLOG("migrateSuperOwnersAttr: Could not lock parent %s",query.str());
                     conn.setown(querySDS().connect(query.str(),myProcessSession(),0,defaultTimeout));
                 }
                 if (conn) {
@@ -11389,7 +11389,7 @@ class CLightWeightSuperFileConn: implements ISimpleSuperFileEnquiry, public CInt
                     migrateSuperOwnersAttr(conn->queryRoot());
                 }
                 else
-                    WARNLOG("migrateSuperOwnersAttr could not connect to parent superfile %s",lfn.get());
+                    IWARNLOG("migrateSuperOwnersAttr could not connect to parent superfile %s",lfn.get());
             }
         }
     }

+ 14 - 14
dali/base/dafdesc.cpp

@@ -143,16 +143,16 @@ bool ClusterPartDiskMapSpec::calcPartLocation (unsigned part, unsigned maxparts,
     if (copy) {
         if (fw) {
             if (interleave>1)
-                ERRLOG("ClusterPartDiskMapSpec interleave not allowed if fill width set");
+                IERRLOG("ClusterPartDiskMapSpec interleave not allowed if fill width set");
             if (flags&CPDMSF_repeatedPart)
-                ERRLOG("ClusterPartDiskMapSpec repeated part not allowed if fill width set");
+                IERRLOG("ClusterPartDiskMapSpec repeated part not allowed if fill width set");
             unsigned m = clusterwidth/maxparts;
             drv = startDrv+(repdrv+(copy/m-1))%maxDrvs;
             node += (copy%m)*maxparts;
         }
         else if ((flags&CPDMSF_repeatedPart)) {
             if (flags&CPDMSF_wrapToNextDrv)
-                ERRLOG("ClusterPartDiskMapSpec repeated part not allowed if wrap to next drive set");
+                IERRLOG("ClusterPartDiskMapSpec repeated part not allowed if wrap to next drive set");
             unsigned repnum = copy%dc;
             unsigned nodenum = copy/dc;
             drv = startDrv+repnum%maxDrvs;
@@ -634,7 +634,7 @@ public:
         ismulti = false;
         if (!isEmptyPTree(pt)) {
             if (pt->getPropInt("@num",idx+1)-1!=idx)
-                WARNLOG("CPartDescriptor part index mismatch");
+                IERRLOG("CPartDescriptor part index mismatch");
             overridename.set(pt->queryProp("@name"));
             if (overridename.isEmpty())
                 overridename.clear();
@@ -965,7 +965,7 @@ class CFileDescriptor:  public CFileDescriptorBase, implements ISuperFileDescrip
         assertex(np>=n);
         if (n==0) {
             clusters.remove(clusters.ordinality()-1);
-            WARNLOG("CFileDescriptor: removing empty cluster");
+            IWARNLOG("CFileDescriptor: removing empty cluster");
         }
         else {
             unsigned w;
@@ -997,7 +997,7 @@ class CFileDescriptor:  public CFileDescriptorBase, implements ISuperFileDescrip
 
                 CPartDescriptor *pt = part(i);
                 if (!pt)
-                    WARNLOG("Null part in pending file descriptor");
+                    IWARNLOG("Null part in pending file descriptor");
                 else if (pt->isMulti()) {
                     assertex(!pt->overridename.isEmpty());
                     if (!isAbsolutePath(pt->overridename)) {        // assumes all multi are same
@@ -1023,7 +1023,7 @@ class CFileDescriptor:  public CFileDescriptorBase, implements ISuperFileDescrip
         else
             splitDirTail(part0.overridename,dir);
         if (dir.length()==0) {
-            WARNLOG("CFileDescriptor cannot determine directory for file %s in '%s'",tracename.str(),part0.overridename.str());
+            IWARNLOG("CFileDescriptor cannot determine directory for file %s in '%s'",tracename.str(),part0.overridename.str());
         }
         else {
             const char *s = dir.str();
@@ -1486,7 +1486,7 @@ public:
                 pt.addPropTree("Cluster",ct.getClear());
             }
             else
-                WARNLOG("CFileDescriptor::serializeTree - empty cluster");
+                IWARNLOG("CFileDescriptor::serializeTree - empty cluster");
         }
         if (grplist.length())
             pt.setProp("@group",grplist.str());
@@ -1595,13 +1595,13 @@ public:
         CPartDescriptor &p = *part(idx);
         p.set(idx,filename,pt);
         if (idx>=pending->ordinality())
-            ERRLOG("IFileDescriptor setPart called after cluster finished");
+            IERRLOG("IFileDescriptor setPart called after cluster finished");
         else {
             SocketEndpoint &pep = pending->element(idx);
             if (pep.isNull())
                 pep=ep;
             else
-                ERRLOG("IFileDescriptor setPart called twice for same part");
+                IERRLOG("IFileDescriptor setPart called twice for same part");
         }
     }
 
@@ -2306,7 +2306,7 @@ IPartDescriptor *deserializePartFileDescriptor(MemoryBuffer &mb)
     IArrayOf<IPartDescriptor> parts;
     Owned<CFileDescriptor> parent = doDeserializePartFileDescriptors(mb,&parts);
     if (parts.ordinality()!=1)
-        ERRLOG("deserializePartFileDescriptor deserializing multiple parts not single part");
+        IERRLOG("deserializePartFileDescriptor deserializing multiple parts not single part");
     if (parts.ordinality()==0)
         return NULL;
     return LINK(&parts.item(0));
@@ -2820,10 +2820,10 @@ void removePartFiles(IFileDescriptor *desc,IMultiException *mexcept)
 //                          PROGLOG("Removed '%s'",partfile->queryFilename());
                         unsigned t = msTick()-start;
                         if (t>60*1000)
-                            LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000);
+                            OWARNLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000);
                     }
 //                      else
-//                          LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
+//                          OWARNLOG("Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
                 }
                 catch (IException *e)
                 {
@@ -2955,7 +2955,7 @@ IFileDescriptor *createFileDescriptorFromRoxieXML(IPropertyTree *tree,const char
                 }
             }
             else
-                ERRLOG("createFileDescriptorFromRoxie: %s missing part %s",id,xpath.str());
+                IERRLOG("createFileDescriptorFromRoxie: %s missing part %s",id,xpath.str());
         }
     }
     res->setPartMask(mask);

+ 75 - 75
dali/base/dasds.cpp

@@ -509,7 +509,7 @@ public:
         }
         catch (IException *e)
         {
-            LOG(MCuserWarning, e, "SDS: Error notifying subscriber");
+            IERRLOG(e, "SDS: Error notifying subscriber");
             e->Release();
         }
         return false; // unsubscribe
@@ -573,7 +573,7 @@ public:
                     msg.append("INFINITE");
                 else
                     msg.append(timeout);
-                ERRLOG("Invalid connection: %s", msg.str());
+                IERRLOG("Invalid connection: %s", msg.str());
                 ForEachItemIn(i, ptreePath)
                 {
                     PTree &tree = ptreePath.item(i);
@@ -607,7 +607,7 @@ public:
 
     void closed(SessionId id)
     {
-        LOG(MCwarning, unknownJob, "Connection (%" I64F "x) was leaked by exiting client (%" I64F "x) path=%s", connectionId, id, queryXPath());
+        IWARNLOG("Connection (%" I64F "x) was leaked by exiting client (%" I64F "x) path=%s", connectionId, id, queryXPath());
         aborted(id);
         subsid=0;
     }
@@ -992,7 +992,7 @@ void writeDelta(StringBuffer &xml, IFile &iFile, const char *msg="", unsigned re
         {
             exception.setown(e);
             StringBuffer s(msg);
-            LOG(MCoperatorError, unknownJob, e, s.append("writeDelta, failed").str());
+            IERRLOG(e, s.append("writeDelta, failed").str());
         }
         if (!exception.get())
             break;
@@ -1000,11 +1000,11 @@ void writeDelta(StringBuffer &xml, IFile &iFile, const char *msg="", unsigned re
             return;
         if (0 == --_retryAttempts)
         {
-            WARNLOG("writeDelta, too many retry attempts [%d]", retryAttempts);
+            IWARNLOG("writeDelta, too many retry attempts [%d]", retryAttempts);
             return;
         }
         exception.clear();
-        WARNLOG("writeDelta, retrying");
+        DBGLOG("writeDelta, retrying");
         MilliSleep(retrySecs*1000);
     }
 }
@@ -1096,11 +1096,11 @@ class CBackupHandler : public CInterface, implements IThreaded
                 return;
             if (0 == --_retryAttempts)
             {
-                WARNLOG("writeExt, too many retry attempts [%d]", retryAttempts);
+                IWARNLOG("writeExt, too many retry attempts [%d]", retryAttempts);
                 return;
             }
             exception.clear();
-            WARNLOG("writeExt, retrying");
+            DBGLOG("writeExt, retrying");
             MilliSleep(retrySecs*1000);
         }
     }
@@ -1129,11 +1129,11 @@ class CBackupHandler : public CInterface, implements IThreaded
                 return;
             if (0 == --_retryAttempts)
             {
-                WARNLOG("deleteExt, too many retry attempts [%d]", retryAttempts);
+                IWARNLOG("deleteExt, too many retry attempts [%d]", retryAttempts);
                 return;
             }
             exception.clear();
-            WARNLOG("deleteExt, retrying");
+            DBGLOG("deleteExt, retrying");
             MilliSleep(retrySecs*1000);
         }
     }
@@ -1264,12 +1264,12 @@ public:
         {
             if (items>lastNumWarnItems) // track as they go up
             {
-                LOG(MCoperatorWarning, "Backup thread has a high # (%d) of pending transaction queued to write", items);
+                IWARNLOG("Backup thread has a high # (%d) of pending transaction queued to write", items);
                 lastNumWarnItems = items;
             }
             else if (warningTime.elapsed() >= 60000) // if falling, avoid logging too much
             {
-                LOG(MCoperatorWarning, "Backup thread has a high # (%d) of pending transaction queued to write", items);
+                IWARNLOG("Backup thread has a high # (%d) of pending transaction queued to write", items);
                 lastNumWarnItems = 0;
                 warningTime.reset(0);
             }
@@ -1285,7 +1285,7 @@ public:
             addWaiting = false;
             recentTimeThrottled += (msTick()-ms); // reset when queue < largeWarningThreshold
             if (recentTimeThrottled >= softQueueLimitDelay && (0 == throttleCounter % 10)) // softQueueLimit exceeded - log every 10 transactions if recentTimeThrottled >= softQueueLimitDelay (1 unsignalled delay)
-                LOG(MCoperatorWarning, "Primary transactions are being delayed by lagging backup, currently %d queued, recent total throttle delay=%d", items, recentTimeThrottled);
+                IWARNLOG("Primary transactions are being delayed by lagging backup, currently %d queued, recent total throttle delay=%d", items, recentTimeThrottled);
             ++throttleCounter; // also reset when queue < largeWarningThreshold
         }
         if (waiting)
@@ -1309,7 +1309,7 @@ public:
         }
         catch (IException *e)
         {
-            LOG(MCoperatorWarning, e, "BackupHandler(async) write operation failed, possible backup data loss");
+            IERRLOG(e, "BackupHandler(async) write operation failed, possible backup data loss");
             e->Release();
         }
         return false;
@@ -2174,7 +2174,7 @@ bool CPTStack::_fill(IPropertyTree &current, const char *xpath, IPropertyTree &t
         {
             if (&tail==&iter->query()) // Afaics, this should not be possible (so this test/block should really be removed)
             {
-                ERRLOG("_fill() - tail (%s) found at intermediate level: %s", tail.queryName(), head.str());
+                IERRLOG("_fill() - tail (%s) found at intermediate level: %s", tail.queryName(), head.str());
                 append(*LINK((PTree *)&iter->query()));
                 append(*LINK((PTree *)&current));
                 return true;
@@ -2220,7 +2220,7 @@ StringBuffer &CPTStack::getAbsolutePath(StringBuffer &str)
 #ifdef DEBUG_HPCC_11202
             if (NotFound == pos)
             {
-                ERRLOG("Invalid CPTStack detected");
+                IERRLOG("Invalid CPTStack detected");
                 ForEachItemIn(i, *this)
                 {
                     PTree &tree = item(i);
@@ -2523,7 +2523,7 @@ public:
     virtual void setServerId(__int64 _serverId) override
     {
         if (serverId && serverId != _serverId)
-            WARNLOG("Unexpected - client server id mismatch in %s, id=%" I64F "x", queryName(), _serverId);
+            IWARNLOG("Unexpected - client server id mismatch in %s, id=%" I64F "x", queryName(), _serverId);
         CRemoteTreeBase::setServerId(_serverId);
     }
 
@@ -2907,19 +2907,19 @@ IPropertyTree *createServerTree(const char *tag=NULL)
     {                                                                                                                       \
         StringBuffer s(TEXT": Consistency check failure, id'd tree not found: ");                                           \
         s.append(PATH).append(", id=").append(ID);                                              \
-        LOG(MCoperatorWarning, unknownJob, s.str());                                                                        \
+        IWARNLOG("%s",s.str());                                                                        \
     }                                                                                                                       \
     else if (!LOCALTREE)                                                                                                    \
     {                                                                                                                       \
         StringBuffer s(TEXT": Consistency check failure, positional property specification: ");                             \
         s.append(PATH).append(", in client update not found in parent tree: ").append(PARENTNAME);              \
-        LOG(MCoperatorWarning, unknownJob, s.str());                                                                        \
+        IWARNLOG("%s",s.str());                                                                        \
     }                                                                                                                       \
     else if (IDTREE != LOCALTREE)                                                                                           \
     {                                                                                                                       \
         StringBuffer s(TEXT": Consistency check failure, positional property specification does not match id'd tree, prop=");\
         s.append(PATH);                                                                                         \
-        LOG(MCoperatorWarning, unknownJob, s.str());                                                                        \
+        IWARNLOG("%s",s.str());                                                                        \
     }
 
 PDState CServerRemoteTree::checkChange(IPropertyTree &changeTree, CBranchChange &parentBranchChange)
@@ -3866,12 +3866,12 @@ int CSDSTransactionServer::run()
                     try { coven.reply(mb); }
                     catch (IJSOCK_Exception *e)
                     {
-                        LOG(MCwarning, unknownJob, e, "Failed to reply to client (CSDSTransactionServer thread)");
+                        IWARNLOG(e, "Failed to reply to client (CSDSTransactionServer thread)");
                         e->Release();
                     }
                     catch (IMP_Exception *e)
                     {
-                        LOG(MCwarning, unknownJob, e, "Failed to reply to client (CSDSTransactionServer thread)");
+                        IWARNLOG(e, "Failed to reply to client (CSDSTransactionServer thread)");
                         e->Release();
                     }
                 }
@@ -3883,7 +3883,7 @@ int CSDSTransactionServer::run()
         {
             StringBuffer s("Failure receiving message from client ");
             mb.getSender().getUrlStr(s);
-            LOG(MCwarning, unknownJob, e, s.str());
+            IWARNLOG(e, s.str());
             e->Release();
         }
     }
@@ -4121,7 +4121,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                     {
                         StringBuffer str("Dali client passing sessionid=0 to connect (xpath=");
                         str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%" I64F "x", connectionId).append(")");
-                        WARNLOG("%s", str.str());
+                        IWARNLOG("%s", str.str());
                     }
                     mb.clear();
                     mb.append((int)DAMP_SDSREPLY_OK);
@@ -4177,7 +4177,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                             {
                                 StringBuffer str("Dali client passing sessionid=0 to multi connect (xpath=");
                                 str.append(xpath).append(", mode=").append(mode).append(", connectionId=").appendf("%" I64F "x", connectionId).append(")");
-                                WARNLOG("%s", str.str());
+                                IWARNLOG("%s", str.str());
                             }
                             CRemoteConnection *conn = new CRemoteConnection(*SDSManager, connectionId, xpath, id, mode, timeout);
                             assertex(conn);
@@ -4199,7 +4199,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
                 {
                     StringBuffer s("Failed to establish locks to multiple paths: ");
                     getMConnectString(mConnect, s);
-                    LOG(MCwarning, unknownJob, e, s.str());
+                    IERRLOG(e, s.str());
                     throw;
                 }
                 catch (DALI_CATCHALL)
@@ -4603,7 +4603,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
     }
     catch (IMP_Exception *e)
     {
-        LOG(MCwarning, unknownJob, e, "Failed to reply to client (processMessage)");
+        IERRLOG(e, "Failed to reply to client (processMessage)");
         e->Release();
     }
     catch (IException *e)
@@ -4625,7 +4625,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb)
         }
         catch (IException *e)
         {
-            LOG(MCwarning, unknownJob, e, "Failed to reply and failed to send reply error to client");
+            IERRLOG(e, "Failed to reply and failed to send reply error to client");
             e->Release();
         }
     }
@@ -4811,7 +4811,7 @@ IPropertyTree *loadStore(const char *storeFilename, IPTreeMaker *iMaker, unsigne
         unsigned crc = crcPipeStream->queryCrc();
 
         if (crcValidation && crc != crcValidation)
-            LOG(MCoperatorWarning, unknownJob, "Error processing store %s - CRC ERROR (file size=%" I64F "d, validation crc=%x, calculated crc=%x)", storeFilename, iFileIOStore->size(), crcValidation, crc); // not fatal yet (maybe later)
+            IWARNLOG("Error processing store %s - CRC ERROR (file size=%" I64F "d, validation crc=%x, calculated crc=%x)", storeFilename, iFileIOStore->size(), crcValidation, crc); // not fatal yet (maybe later)
     }
     catch (IException *e)
     {
@@ -4819,7 +4819,7 @@ IPropertyTree *loadStore(const char *storeFilename, IPTreeMaker *iMaker, unsigne
         {
             StringBuffer s("Exception - loading store file : ");
             s.appendf("%s", storeFilename);
-            LOG(MCoperatorError, unknownJob, e, s.str());
+            IERRLOG(e, s.str());
         }
         if (SDSExcpt_OpenStoreFailed != e->errorCode())
             if (!logErrorsOnly)
@@ -4881,13 +4881,13 @@ public:
         char const *quietEndTimeStr = config->queryProp("@lCQuietEndTime");
         if (quietStartTimeStr && !quietEndTimeStr)
         {
-            WARNLOG("Start time for quiet period specified without end time, ignoring times");
+            OWARNLOG("Start time for quiet period specified without end time, ignoring times");
             quietStartTime.clear();
         }
         else if (quietEndTimeStr && *quietEndTimeStr)
         {
             if (!quietStartTimeStr)
-                WARNLOG("End time for quiet period specified without start time, ignoring times");
+                OWARNLOG("End time for quiet period specified without start time, ignoring times");
             else
             {
                 quietEndTime.setown(createDateTime());
@@ -4974,7 +4974,7 @@ public:
                             t += idlePeriod/1000;
                             if (t/3600 >= STORENOTSAVE_WARNING_PERIOD && ((t-lastWarning)/3600>(STORENOTSAVE_WARNING_PERIOD/2)))
                             {
-                                WARNLOG("Store has not been saved for %d hours", t/3600);
+                                OWARNLOG("Store has not been saved for %d hours", t/3600);
                                 lastWarning = t;
                             }
                         }
@@ -5360,8 +5360,8 @@ public:
                         if (fSize > lastGood)
                         {
                             offset_t diff = fSize - lastGood;
-                            LOG(MCoperatorError, unknownJob, "Delta file '%s', has %" I64F "d bytes of trailing data (possible power loss during save?), file size: %" I64F "d, last committed size: %" I64F "d", filename, diff, fSize, lastGood);
-                            LOG(MCoperatorError, unknownJob, "Resetting delta file '%s' to size: %" I64F "d", filename, lastGood);
+                            OWARNLOG("Delta file '%s', has %" I64F "d bytes of trailing data (possible power loss during save?), file size: %" I64F "d, last committed size: %" I64F "d", filename, diff, fSize, lastGood);
+                            OWARNLOG("Resetting delta file '%s' to size: %" I64F "d", filename, lastGood);
                             iFileIO->close();
                             backup(filename);
                             iFileIO.setown(iFile->open(IFOreadwrite));
@@ -5387,7 +5387,7 @@ public:
             {
                 noErrors = false;
                 StringBuffer s;
-                LOG(MCoperatorWarning, unknownJob, "%s", s.append("Delta '").append(filename).append("' crc mismatch").str());
+                OWARNLOG("%s", s.append("Delta '").append(filename).append("' crc mismatch").str());
             }
         }
         return noErrors;
@@ -5482,7 +5482,7 @@ public:
         }
         catch (IException *e)
         {
-            LOG(MCoperatorError, unknownJob, e, "detachCurrentDelta");
+            IERRLOG(e, "detachCurrentDelta");
             e->Release();
         }
         return res;
@@ -5521,7 +5521,7 @@ public:
             }
             catch (IException *e)
             {
-                LOG(MCoperatorError, unknownJob, e, "Exception(1) - Error saving store file");
+                OERRLOG(e, "Exception(1) - Error saving store file");
                 iFileIOTmpStore.clear();
                 iFileTmpStore->remove();
                 throw;
@@ -5534,7 +5534,7 @@ public:
             refreshStoreInfo();
             if (storeInfo.edition != edition)
             {
-                WARNLOG("Another process has updated the edition whilst saving the store: %s", newStoreNamePath.str());
+                OWARNLOG("Another process has updated the edition whilst saving the store: %s", newStoreNamePath.str());
                 iFileTmpStore->remove();
                 return;
             }
@@ -5560,7 +5560,7 @@ public:
                 catch (IException *e)
                 {
                     StringBuffer s("Exception(2) - Error saving store file");
-                    LOG(MCoperatorError, unknownJob, e, s.str());
+                    OERRLOG(e, s.str());
                     e->Release();
                     return;
                 }
@@ -5612,7 +5612,7 @@ public:
         catch (IException *e)
         {
             StringBuffer s("Exception(3) - Error saving store file");
-            LOG(MCoperatorError, unknownJob, e, s.str());
+            OERRLOG(e, s.str());
             e->Release();
         }
         if (done)
@@ -5803,7 +5803,7 @@ CCovenSDSManager::CCovenSDSManager(ICoven &_coven, IPropertyTree &_config, const
     {
         char cwd[1024];
         if (!GetCurrentDirectory(1024, cwd)) {
-            ERRLOG("CCovenSDSManager: Current directory path too big, setting local path to null");
+            OERRLOG("CCovenSDSManager: Current directory path too big, setting local path to null");
             cwd[0] = 0;
         }
         rfn.setLocalPath(cwd);
@@ -5898,7 +5898,7 @@ void CCovenSDSManager::validateDeltaBackup()
     OwnedIFile iFileDeltaBackup = createIFile(deltaFilename.str());
     if (!compareFiles(iFileDeltaBackup, iFileDelta, false))
     {
-        WARNLOG("Delta file backup doesn't exist or differs, filename=%s", deltaFilename.str());
+        OWARNLOG("Delta file backup doesn't exist or differs, filename=%s", deltaFilename.str());
         copyFile(iFileDeltaBackup, iFileDelta);
     }
 }
@@ -5929,7 +5929,7 @@ void CCovenSDSManager::validateBackup()
     OwnedIFile iFileBackupStore = createIFile(storeFilename.str());
     if (!compareFiles(iFileBackupStore, iFileStore))
     {
-        WARNLOG("Store backup file doesn't exist or differs, filename=%s", storeFilename.str());
+        OWARNLOG("Store backup file doesn't exist or differs, filename=%s", storeFilename.str());
         copyFile(iFileBackupStore, iFileStore);
     }
 }
@@ -6215,7 +6215,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
                     StringBuffer name(EXTERNAL_NAME_PREFIX);
                     name.append(fileN);
                     extHandler->getName(fname, name.str());
-                    WARNLOG("Unreferenced %s external %s file", primary?"primary":"backup", fname.str());
+                    OWARNLOG("Unreferenced %s external %s file", primary?"primary":"backup", fname.str());
                     ++fileP;
                     if (fileP == fileExts.ordinality())
                     {
@@ -6230,7 +6230,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
                     StringBuffer name(EXTERNAL_NAME_PREFIX);
                     name.append(refN);
                     extHandler->getName(fname, name.str());
-                    WARNLOG("External %s file reference %s missing", primary?"primary":"backup", fname.str());
+                    OWARNLOG("External %s file reference %s missing", primary?"primary":"backup", fname.str());
                     if (primary)
                         missingPrimarys.append(refN);
                     else
@@ -6312,7 +6312,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
                     IExternalHandler *extHandler = queryExternalHandler(itm.ext);
                     if (!extHandler)
                     {
-                        WARNLOG("Unknown external extension, external=%s, extension=%s", itm.name.get(), itm.ext.get());
+                        OWARNLOG("Unknown external extension, external=%s, extension=%s", itm.name.get(), itm.ext.get());
                         continue;
                     }
                     StringBuffer fname;
@@ -6346,12 +6346,12 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
     }
     catch (IException *e)
     {
-        LOG(MCoperatorError, unknownJob, e, "Exception - Failed to load main store");
+        OERRLOG(e, "Exception - Failed to load main store");
         throw;
     }
     catch (DALI_CATCHALL)
     {
-        LOG(MCoperatorError, unknownJob, "Unknown exception - Failed to load main store");
+        OERRLOG("Unknown exception - Failed to load main store");
         throw;
     }
 
@@ -6380,7 +6380,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
                 doTimeComparison = true;
         }
         if (!doTimeComparison)
-            LOG(MCoperatorWarning, unknownJob, "Unable to use time comparison when comparing delta backup file");
+            OWARNLOG("Unable to use time comparison when comparing delta backup file");
     }
     Owned<IRemoteConnection> conn = connect("/", 0, RTM_INTERNAL, INFINITE);
     initializeInternals(conn->queryRoot());
@@ -6479,12 +6479,12 @@ void CCovenSDSManager::saveDelta(const char *path, IPropertyTree &changeTree)
         // don't save any changed to /Environment if external
         if (0 == strncmp("/Environment", path, strlen("/Environment")))
         {
-            WARNLOG("Attempt to change read-only Dali environment, path = %s", path);
+            OWARNLOG("Attempt to change read-only Dali environment, path = %s", path);
             return;
         }
         if (0 == strcmp("/", path) && changeTree.hasProp("*[@name=\"Environment\"]"))
         {
-            WARNLOG("Attempt to change read-only Dali environment, path = %s", path);
+            OWARNLOG("Attempt to change read-only Dali environment, path = %s", path);
             return;
         }
     }
@@ -6553,7 +6553,7 @@ void CCovenSDSManager::saveDelta(const char *path, IPropertyTree &changeTree)
     {
         // NB: writeDelta retries a few times before giving up.
         VStringBuffer errMsg("saveDelta: failed to save delta data, blockedDelta size=%d", blockedDelta.length());
-        LOG(MCoperatorError, unknownJob, e, errMsg.str());
+        OWARNLOG(e, errMsg.str());
         e->Release();
         return;
     }
@@ -6563,18 +6563,18 @@ void CCovenSDSManager::saveDelta(const char *path, IPropertyTree &changeTree)
         {
             if (backupOutOfSync) // true if there was previously an exception during synchronously writing delta to backup.
             {
-                LOG(MCoperatorError, unknownJob, "Backup delta is out of sync due to a prior backup write error, attempting to resync");
+                OWARNLOG("Backup delta is out of sync due to a prior backup write error, attempting to resync");
                 // catchup - check and copy primary delta to backup
                 validateDeltaBackup();
                 backupOutOfSync = false;
-                LOG(MCoperatorError, unknownJob, "Backup delta resynchronized");
+                OWARNLOG("Backup delta resynchronized");
             }
             else
                 backupHandler.addDelta(blockedDelta, iStoreHelper->queryCurrentEdition(), first);
         }
         catch (IException *e)
         {
-            LOG(MCoperatorError, unknownJob, e, "saveDelta: failed to save backup delta data");
+            OERRLOG(e, "saveDelta: failed to save backup delta data");
             e->Release();
             backupOutOfSync = true;
         }
@@ -7117,7 +7117,7 @@ void CCovenSDSManager::getExternalValueFromServerId(__int64 serverId, MemoryBuff
         if (index)
             getExternalValue(index, mb);
         else
-            WARNLOG("External file reference missing (node name='%s', id=%" I64F "d)", idTree->queryName(), serverId);
+            OWARNLOG("External file reference missing (node name='%s', id=%" I64F "d)", idTree->queryName(), serverId);
     }
 }
 
@@ -7163,19 +7163,19 @@ void CCovenSDSManager::stop()
 
 void CCovenSDSManager::restart(IException * e)
 {
-    LOG(MCwarning, unknownJob, "-------: stopping SDS server");
+    PROGLOG("-------: stopping SDS server");
     StringBuffer msg;
     msg.append("Unhandled exception, restarting: ").append(e->errorCode()).append(": ");
     e->errorMessage(msg);
     stop();
     connections.kill();
-    LOG(MCwarning, unknownJob, "-------: stopped");
-    LOG(MCwarning, unknownJob, "-------: saving current store . . . . . .");
+    DBGLOG("-------: stopped");
+    DBGLOG("-------: saving current store . . . . . .");
     saveStore();
-    LOG(MCwarning, unknownJob, "-------: store saved.");
-    LOG(MCwarning, unknownJob, "-------: restarting SDS server restart");
+    DBGLOG("-------: store saved.");
+    DBGLOG("-------: restarting SDS server restart");
     start();
-    LOG(MCwarning, unknownJob, "-------: restarted");
+    PROGLOG("-------: restarted");
 }
 
 CServerConnection *CCovenSDSManager::createConnectionInstance(CRemoteTreeBase *root, SessionId sessionId, unsigned mode, unsigned timeout, const char *xpath, CRemoteTreeBase *&tree, ConnectionId _connectionId, StringAttr *deltaPath, Owned<IPropertyTree> &deltaChange, Owned<CBranchChange> &branchChange, unsigned &additions)
@@ -7898,7 +7898,7 @@ void CCovenSDSManager::disconnect(ConnectionId id, bool deleteRoot, Owned<CLCLoc
                 saveDelta(head.str(), *changeTree);
             else
             { // NB: don't believe this can happen, but last thing want to do is save duff delete delta.
-                WARNLOG("** CCovenSDSManager::disconnect - index position lost **");
+                IERRLOG("** CCovenSDSManager::disconnect - index position lost **");
                 PrintStackReport();
             }
         }
@@ -8160,7 +8160,7 @@ void CCovenSDSManager::handleNodeNotify(notifications n, CServerRemoteTree &tree
     CSDSNotifyHandlerMapping *m = nodeNotifyHandlers.find(handlerKey);
     if (!m)
     {
-        LOG(MCwarning, unknownJob, "Unknown notify handler name \"%s\", handing event %s", handlerKey, notificationStr(n));
+        DBGLOG("Unknown notify handler name \"%s\", handing event %s", handlerKey, notificationStr(n));
         return;
     }
     switch (n)
@@ -8176,7 +8176,7 @@ void CCovenSDSManager::handleNodeNotify(notifications n, CServerRemoteTree &tree
             }
             break;
         default:
-            LOG(MCerror, unknownJob, "Unknown notification type (%d)", n);
+            DBGLOG("Unknown notification type (%d)", n);
             break;
     }
 }
@@ -8639,7 +8639,7 @@ bool CCovenSDSManager::fireException(IException *e)
 {
     //This code is rather dodgy (and causes more problems than it solves) 
     // so ignore unhandled exceptions for the moment! 
-    LOG(MCoperatorError, unknownJob, e, "Caught unhandled exception!");
+    IERRLOG(e, "Caught unhandled exception!");
     return true;
     { CHECKEDCRITICALBLOCK(unhandledCrit, fakeCritTimeout);
         if (processingUnhandled)
@@ -8649,7 +8649,7 @@ bool CCovenSDSManager::fireException(IException *e)
                 LOG(MCdisaster, unknownJob, e, "FATAL, too many exceptions");
                 return false; // did not successfully handle.
             }
-            LOG(MCoperatorError, unknownJob, e, "Exception while restarting or shutting down");
+            IERRLOG(e, "Exception while restarting or shutting down");
             return true;
         }
         handled = false;
@@ -8684,7 +8684,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 (DALI_CATCHALL) { LOG(MCoperatorError, unknownJob, "Unknown exception while restarting or shutting down"); }
+            catch (DALI_CATCHALL) { IERRLOG("Unknown exception while restarting or shutting down"); }
             if (!restart)
             {
                 e->Link();
@@ -8790,7 +8790,7 @@ public:
             IMPLEMENT_IINTERFACE;
              virtual void removed(IPropertyTree &tree)
              {
-                 PrintLog("Hello, tree(%s) handler(%s), being deleted", tree.queryName(), queryNotifyHandlerName(&tree));
+                 DBGLOG("Hello, tree(%s) handler(%s), being deleted", tree.queryName(), queryNotifyHandlerName(&tree));
              }
         };
         Owned<ISDSNotifyHandler> myHan = new CTestHan();
@@ -8955,7 +8955,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
                 StringBuffer xpath(d.queryProp("@name"));
                 xpath.append('[').append(d.queryProp("@pos")).append(']');
                 if (!currentBranch.removeProp(xpath.str()))
-                    LOG(MCoperatorWarning, unknownJob, "Property '%s' missing, but recorded as being present at time of delete, in section '%s'", xpath.str(), headerPath.get());
+                    OWARNLOG("Property '%s' missing, but recorded as being present at time of delete, in section '%s'", xpath.str(), headerPath.get());
             }
             IPropertyTree *ac = change.queryPropTree(ATTRCHANGE_TAG);
             if (ac)
@@ -8971,7 +8971,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
                 ForEach (*aIter)
                 {
                     if (!currentBranch.removeProp(aIter->queryName()))
-                        LOG(MCoperatorWarning, unknownJob, "Property '%s' missing, but recorded as being present at time of delete, in section '%s'", aIter->queryName(), headerPath.get());
+                        OWARNLOG("Property '%s' missing, but recorded as being present at time of delete, in section '%s'", aIter->queryName(), headerPath.get());
                 }
             }
 
@@ -9014,7 +9014,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
                 catch (IException *e)
                 {
                     StringBuffer s("Error processing delta section: sectionEndOffset=");
-                    LOG(MCoperatorError, unknownJob, e, s.append(sectionEndOffset).str());
+                    OWARNLOG(e, s.append(sectionEndOffset).str());
                     if (stopOnError) throw;
                     hadError = true;
                     e->Release();
@@ -9063,7 +9063,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
             catch (IException *e)
             {
                 StringBuffer s("Error processing delta section: sectionEndOffset=");
-                LOG(MCoperatorError, unknownJob, e, s.append(endOffset).str());
+                OERRLOG(e, s.append(endOffset).str());
                 if (stopOnError) throw;
                 hadError = true;
                 e->Release();
@@ -9080,7 +9080,7 @@ bool applyXmlDeltas(IPropertyTree &root, IIOStream &stream, bool stopOnError)
     {
         if (stopOnError)
             throw;
-        LOG(MCoperatorError, unknownJob, e, "XML parse error on delta load - load truncated");
+        OWARNLOG(e, "XML parse error on delta load - load truncated");
         e->Release();
     }
     return !deltaProcessor.hadError;

+ 14 - 14
dali/base/dasess.cpp

@@ -143,7 +143,7 @@ class CdelayedTerminate: public Thread // slightly obfuscated stop code
     int run()
     {
         while (getRandom()%711!=0) getRandom(); // look busy
-        ERRLOG("Server fault %d",(int)err);
+        IERRLOG("Server fault %d",(int)err);
         while (getRandom()%7!=0) Sleep(1);
         exit(0);
     }
@@ -1262,7 +1262,7 @@ public:
     static CLdapWorkItem *get(IDaliLdapConnection *_ldapconn,Semaphore &_threaddone)
     {
         if (!_threaddone.wait(1000*60*5)) {
-            ERRLOG("Too many stalled LDAP threads");
+            OWARNLOG("Too many stalled LDAP threads");
             return NULL;
         }
         return new CLdapWorkItem(_ldapconn,_threaddone);
@@ -1332,11 +1332,11 @@ public:
     {
         stopping = true;
         if (!ldapsig.wait(60*1000))
-            WARNLOG("LDAP stalled(1)");
+            OWARNLOG("LDAP stalled(1)");
         if (ldapworker) {
             ldapworker->stop();
             if (!ldapworker->join(1000))
-                WARNLOG("LDAP stalled(2)");
+                OWARNLOG("LDAP stalled(2)");
             ldapworker.clear();
         }
         ldapconn.clear();
@@ -1372,7 +1372,7 @@ public:
         CProcessSessionState *s = new CProcessSessionState(id,client,role);
         while (!sessionstates.add(s)) // takes ownership
         {
-            WARNLOG("Dali session manager: session already registered");
+            OWARNLOG("Dali session manager: session already registered");
             sessionstates.remove(id);
         }
         while (!processlookup.add(s))
@@ -1385,7 +1385,7 @@ public:
             dbgassertex(previousState); // Must be there, it's reason add() failed
             SessionId oldSessionId = previousState->getId();
             s->addSessionIds(*previousState, false); // merges sessions from previous process state into new one that replaces it
-            WARNLOG("Dali session manager: registerClient process session already registered, old (%" I64F "x) replaced", oldSessionId);
+            OWARNLOG("Dali session manager: registerClient process session already registered, old (%" I64F "x) replaced", oldSessionId);
             processlookup.remove(previousState, this);
         }
     }
@@ -1395,7 +1395,7 @@ public:
         CHECKEDCRITICALBLOCK(sessmanagersect,60000);
         CSessionState *s = new CSessionState(id);
         while (!sessionstates.add(s)) { // takes ownership
-            WARNLOG("Dali session manager: session already registered (2)");
+            OWARNLOG("Dali session manager: session already registered (2)");
             sessionstates.remove(id);
         }
     }
@@ -1494,11 +1494,11 @@ public:
                     ldapworker->start(key,obj,udesc,flags,reqSignature,reqUTCTimestamp);
                     for (unsigned i=0;i<10;i++) {
                         if (i)
-                            WARNLOG("LDAP stalled(%d) - retrying",i);
+                            OWARNLOG("LDAP stalled(%d) - retrying",i);
                         SecAccessFlags ret;
                         if (ldapworker->wait(1000*20,(int&)ret)) {
                             if (ret==CLDAPE_ldapfailure) {
-                                LOG(MCoperatorError, unknownJob, "LDAP - failure (returning no access for %s)",obj); 
+                                OERRLOG("LDAP - failure (returning no access for %s)",obj); 
                                 ldapsig.signal();
                                 if (err)
                                     *err = CLDAPE_ldapfailure;
@@ -1523,7 +1523,7 @@ public:
                         ldapworker->stop();
                     ldapworker.clear(); // abandon thread
                 }
-                LOG(MCoperatorError, unknownJob, "LDAP stalled - aborting (returning no access for %s)",obj); 
+                OERRLOG("LDAP stalled - aborting (returning no access for %s)",obj); 
                 ldapsig.signal();
                 if (err)
                     *err = CLDAPE_getpermtimeout;
@@ -1535,7 +1535,7 @@ public:
                 static unsigned lasttick=0;
                 static unsigned first50=0;
                 if ((waiting!=last)&&(msTick()-lasttick>1000)) {
-                    WARNLOG("%d threads waiting for ldap",waiting);
+                    OWARNLOG("%d threads waiting for ldap",waiting);
                     last = waiting;
                     lasttick = msTick();
                 }
@@ -1543,7 +1543,7 @@ public:
                     if (first50==0)
                         first50 = msTick();
                     else if (msTick()-first50>60*1000) {
-                        LOG(MCoperatorError, unknownJob, "LDAP stalled - aborting (returning 0 for %s)", obj); 
+                        OERRLOG("LDAP stalled - aborting (returning 0 for %s)", obj); 
                         if (err)
                             *err = CLDAPE_getpermtimeout;
                         break;
@@ -1698,7 +1698,7 @@ protected:
         MemoryBuffer mb;
         bool abort=true;
         mb.append(abort);
-        ERRLOG("Session Manager - adding unknown session ID %" I64F "x", nstub->getSessionId());
+        OWARNLOG("Session Manager - adding unknown session ID %" I64F "x", nstub->getSessionId());
         subs->notify(mb); 
         delete nstub;
         return;
@@ -2018,7 +2018,7 @@ bool registerClientProcess(ICommunicator *comm, IGroup *& retcoven,unsigned time
             }
         }
         StringBuffer str;
-        PROGLOG("Failed to connect to Dali Server %s.", comm->queryGroup().queryNode(r).endpoint().getUrlStr(str).str());
+        OERRLOG("Failed to connect to Dali Server %s.", comm->queryGroup().queryNode(r).endpoint().getUrlStr(str).str());
         if (tm.timedout())
         {
             PROGLOG("%s", str.append(" Timed out.").str());

+ 6 - 6
dali/base/dasubs.cpp

@@ -313,7 +313,7 @@ public:
                 coven.reply(mb);
                 unsigned telapsed=msTick()-tstart;
                 if (telapsed>1000)
-                    LOG(MCerror, unknownJob, "MSR_REMOVE_SUBSCRIPTION_PRIMARY.1 took %dms",telapsed);
+                    DBGLOG("MSR_REMOVE_SUBSCRIPTION_PRIMARY.1 took %dms",telapsed);
             }
             break;
         }
@@ -352,7 +352,7 @@ public:
         }
         unsigned telapsed=msTick()-tstart;
         if (telapsed>1000)
-            LOG(MCerror, unknownJob, "CDaliPublisherServer::unlink took %dms",telapsed);
+            DBGLOG("CDaliPublisherServer::unlink took %dms",telapsed);
     }
     
     void onClose(SocketEndpoint &ep)
@@ -370,7 +370,7 @@ public:
             }
             unsigned telapsed=msTick()-tstart;
             if (telapsed>1000)
-                LOG(MCerror, unknownJob, "CDaliPublisherServer::onClose took %dms",telapsed);
+                DBGLOG("CDaliPublisherServer::onClose took %dms",telapsed);
         }
     }
 
@@ -411,7 +411,7 @@ public:
         }
         unsigned telapsed=msTick()-tstart;
         if (telapsed>1000)
-            LOG(MCerror, unknownJob, "CDaliPublisherServer::getSubscriptionList took %dms",telapsed);
+            DBGLOG("CDaliPublisherServer::getSubscriptionList took %dms",telapsed);
         return buf;
     }
 
@@ -523,14 +523,14 @@ public:
     }
     void abort()
     {
-        PrintLog("CDaliSubscriptionManagerStub aborting");
+        DBGLOG("CDaliSubscriptionManagerStub aborting");
         CriticalBlock block(subscriptionsect);
         ForEachItemIn(i,subscriptions) {
             subscriptions.item(i).abort();
         }
         subscriptions.kill();
         ids.kill();
-        PrintLog("CDaliSubscriptionManagerStub aborted");
+        DBGLOG("CDaliSubscriptionManagerStub aborted");
     }
 };
 

+ 23 - 23
dali/base/dautils.cpp

@@ -352,7 +352,7 @@ void CDfsLogicalFileName::expand(IUserDescriptor *user)
         {
             StringBuffer err;
             e->errorMessage(err);
-            ERRLOG("CDfsLogicalFileName::expand %s",err.str());
+            IERRLOG("CDfsLogicalFileName::expand %s",err.str());
             throw;
         }
     }
@@ -599,7 +599,7 @@ void CDfsLogicalFileName::set(const char *name, bool removeForeign)
     {
         StringBuffer err;
         e->errorMessage(err);
-        WARNLOG("CDfsLogicalFileName::set %s",err.str());
+        IERRLOG("CDfsLogicalFileName::set %s",err.str());
         e->Release();
     }
     if (multi)
@@ -668,7 +668,7 @@ void CDfsLogicalFileName::set(const char *scopes,const char *tail)
     s.append(tail);
     set(s.str());
     if (multi)
-        WARNLOG("set with scopes called on multi-lfn %s",get());
+        DBGLOG("set with scopes called on multi-lfn %s",get());
 }
 
 
@@ -884,7 +884,7 @@ void CDfsLogicalFileName::setQuery(const SocketEndpoint &rfsep,const char *query
 void CDfsLogicalFileName::setCluster(const char *cname)
 {
     if (multi)
-        WARNLOG("setCluster called on multi-lfn %s",get());
+        DBGLOG("setCluster called on multi-lfn %s",get());
     skipSp(cname);
     StringBuffer name(cname);
     cluster.set(name.clip().toLowerCase().str());
@@ -899,7 +899,7 @@ const char *CDfsLogicalFileName::get(bool removeforeign) const
         return "";
     if (removeforeign) {
         if (multi)
-            WARNLOG("CDfsLogicalFileName::get with removeforeign set called on multi-lfn %s",get());
+            DBGLOG("CDfsLogicalFileName::get with removeforeign set called on multi-lfn %s",get());
         ret += localpos;
     }
     return ret;
@@ -917,10 +917,10 @@ StringBuffer &CDfsLogicalFileName::get(StringBuffer &str, bool removeforeign, bo
 const char *CDfsLogicalFileName::queryTail() const
 {
     if (multi)
-        WARNLOG("CDfsLogicalFileName::queryTail called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::queryTail called on multi-lfn %s",get());
     const char *tail = get()+tailpos;
     if (strstr(tail,"::")!=NULL) {
-        ERRLOG("Tail contains '::'!");
+        OERRLOG("Tail contains '::'!");
     }
     return get()+tailpos;
 }
@@ -933,7 +933,7 @@ StringBuffer &CDfsLogicalFileName::getTail(StringBuffer &buf) const
 StringBuffer &CDfsLogicalFileName::getScopes(StringBuffer &buf,bool removeforeign) const
 {
     if (multi)
-        WARNLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
     // gets leading scopes without trailing ::
     const char *s =lfn.get();
     if (!s||(tailpos<=2))
@@ -954,7 +954,7 @@ unsigned CDfsLogicalFileName::numScopes(bool removeforeign) const
     if (!s)
         return 0;
     if (multi)
-        WARNLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
     if (removeforeign)
         s += localpos;
     // num scopes = number of "::"s
@@ -974,7 +974,7 @@ StringBuffer &CDfsLogicalFileName::getScope(StringBuffer &buf,unsigned idx,bool
     if (!s)
         return buf;
     if (multi)
-        WARNLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::getScopes called on multi-lfn %s",get());
     if (removeforeign)
         s += localpos;
     // num scopes = number of "::"s
@@ -995,7 +995,7 @@ StringBuffer &CDfsLogicalFileName::getScope(StringBuffer &buf,unsigned idx,bool
 StringBuffer &CDfsLogicalFileName::makeScopeQuery(StringBuffer &query, bool absolute) const
 {
     if (multi)
-        WARNLOG("CDfsLogicalFileName::makeFullnameQuery called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::makeFullnameQuery called on multi-lfn %s",get());
     if (absolute)
         query.append(SDS_DFS_ROOT "/");
     // returns full xpath for containing scope
@@ -1077,7 +1077,7 @@ bool CDfsLogicalFileName::getEp(SocketEndpoint &ep) const
         ns = NULL;
     if (ns) {
         if (multi)
-            WARNLOG("CDfsLogicalFileName::getEp called on multi-lfn %s",get());
+            DBGLOG("CDfsLogicalFileName::getEp called on multi-lfn %s",get());
         const char *e = strstr(ns,"::");
         if (e) {
             StringBuffer node(e-ns,ns);
@@ -1111,7 +1111,7 @@ bool CDfsLogicalFileName::getExternalPath(StringBuffer &dir, StringBuffer &tail,
         return false;
     }
     if (multi)
-        WARNLOG("CDfsLogicalFileName::makeFullnameQuery called on multi-lfn %s",get());
+        DBGLOG("CDfsLogicalFileName::makeFullnameQuery called on multi-lfn %s",get());
     const char *s = skipScope(lfn,EXTERNAL_SCOPE);
     if (s)
         s = strstr(s,"::");
@@ -1544,7 +1544,7 @@ unsigned getFileGroups(IPropertyTree *pt,StringArray &groups, bool checkclusters
                 on = "<UNKNOWN>";
             unsigned nc = pt->getPropInt("@numclusters");
             if (nc&&(nc!=groups.ordinality())) {
-                ERRLOG("%s groups/numclusters mismatch",on);
+                OERRLOG("%s groups/numclusters mismatch",on);
             }
             MemoryAttr ma;
             unsigned ng = groups.ordinality();
@@ -1565,7 +1565,7 @@ unsigned getFileGroups(IPropertyTree *pt,StringArray &groups, bool checkclusters
                 ForEachItemIn(i,groups) {
                     if (strcmp(cname,groups.item(i))==0) {
                         if (found[i]) {
-                            ERRLOG("'%s' has duplicate cluster",on);
+                            OERRLOG("'%s' has duplicate cluster",on);
                         }
                         else
                             found[i] = true;
@@ -1575,13 +1575,13 @@ unsigned getFileGroups(IPropertyTree *pt,StringArray &groups, bool checkclusters
                 }
                 if (!ok) {
                     const char * gs = pt->queryProp("@group");
-                    ERRLOG("'%s' has missing cluster(%s) in groups(%s)",on,cname,gs?gs:"NULL");
+                    OERRLOG("'%s' has missing cluster(%s) in groups(%s)",on,cname,gs?gs:"NULL");
                 }
             }
             if (anyfound) {
                 for (unsigned i=0;i<ng;i++)
                     if (!found[i])
-                        WARNLOG("'%s' has missing group(%s) in clusters",on,groups.item(i));
+                        DBGLOG("'%s' has missing group(%s) in clusters",on,groups.item(i));
             }
         }
     }
@@ -1652,7 +1652,7 @@ void expandFileTree(IPropertyTree *file,bool expandnodes,const char *cluster)
                 break;
             }
         if (i==ng)
-            ERRLOG("expandFileTree: Cluster %s not found in file",cluster);
+            OERRLOG("expandFileTree: Cluster %s not found in file",cluster);
     }
     if (cn<ng) {
         const char *gname = groups.item(cn);
@@ -2578,7 +2578,7 @@ public:
     }
     virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
     {
-//      PrintLog("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
+//      DBGLOG("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
         sem.signal();
     }
 };
@@ -2754,7 +2754,7 @@ public:
     ~CDFSredirection()
     {
         if (linked)
-            ERRLOG("CDFSredirection: cDFSredirect leaked(%d)",linked);
+            IERRLOG("CDFSredirection: cDFSredirect leaked(%d)",linked);
         clear();
     }
 
@@ -2874,7 +2874,7 @@ public:
         // *doesn't* reload (but invalidates last load time)
         Owned<IRemoteConnection> conn = querySDS().connect("Files/Redirection", myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_QUERY, SDS_LOCK_TIMEOUT);
         if (!conn) {
-            ERRLOG("Cannot update Files/Redirection");
+            OERRLOG("Cannot update Files/Redirection");
             return;
         }
         IPropertyTree &root = *conn->queryRoot();
@@ -2988,7 +2988,7 @@ void safeChangeModeWrite(IRemoteConnection *conn,const char *name,bool &reload,
             {
                 unsigned tt = msTick()-start;
                 if (count++>0) {// don't warn first time
-                    WARNLOG("safeChangeModeWrite on %s waiting for %ds",name,tt/1000);
+                    DBGLOG("safeChangeModeWrite on %s waiting for %ds",name,tt/1000);
                     if (count==2)
                         PrintStackReport();
                 }
@@ -3004,7 +3004,7 @@ void safeChangeModeWrite(IRemoteConnection *conn,const char *name,bool &reload,
         }
         // temporarily release the lock, we don't need to warn twice, do we?
         if (!reload) {
-            WARNLOG("safeChangeModeWrite - temporarily releasing lock on %s to avoid deadlock",name);
+            DBGLOG("safeChangeModeWrite - temporarily releasing lock on %s to avoid deadlock",name);
             conn->changeMode(RTM_NONE);
             reload = true;
         }

+ 59 - 59
dali/daliadmin/daliadmin.cpp

@@ -244,7 +244,7 @@ static void _export_(const char *path,const char *dst,bool safe=false)
     StringBuffer xpath;
     Owned<IRemoteConnection> conn = connectXPathOrFile(path,safe,xpath);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -264,7 +264,7 @@ static void import(const char *path,const char *src,bool add)
     Owned<IFileIO> iFileIO = iFile->open(IFOread);
     if (!iFileIO)
     {
-        ERRLOG("Could not open to %s",src);
+        UERRLOG("Could not open to %s",src);
         return;
     }
     size32_t sz = (size32_t)iFile->size();
@@ -287,7 +287,7 @@ static void import(const char *path,const char *src,bool add)
     }
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),0, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     StringAttr newtail; // must be declared outside the following if
@@ -333,13 +333,13 @@ static void _delete_(const char *path,bool backup)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_WRITE, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
     Owned<IPropertyTree> child = root->getPropTree(tail);
     if (!child) {
-        ERRLOG("Couldn't find %s/%s",head.str(),tail);
+        UERRLOG("Couldn't find %s/%s",head.str(),tail);
         return;
     }
     if (backup) {
@@ -365,7 +365,7 @@ static void set(const char *path,const char *val)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_WRITE, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -388,7 +388,7 @@ static void get(const char *path)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -408,7 +408,7 @@ static void bget(const char *path,const char *outfn)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -428,7 +428,7 @@ static void xget(const char *path)
         return;
     Owned<IRemoteConnection> conn = querySDS().connect("/",myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to /");
+        UERRLOG("Could not connect to /");
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -475,7 +475,7 @@ static void wget(const char *path)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTreeIterator> iter = conn->queryRoot()->getElements(tail);
@@ -499,7 +499,7 @@ static void add(const char *path, const char *val)
     Owned<IRemoteConnection> conn = querySDS().connect(path, myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_ADD, daliConnectTimeoutMs);
     if (!conn)
     {
-        ERRLOG("Could not connect to %s", path);
+        UERRLOG("Could not connect to %s", path);
         return;
     }
     VStringBuffer msg("Added %s", path);
@@ -520,7 +520,7 @@ static void delv(const char *path)
     const char *tail=splitpath(path,head,tmp);
     Owned<IRemoteConnection> conn = querySDS().connect(head.str(),myProcessSession(),RTM_LOCK_WRITE, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",path);
+        UERRLOG("Could not connect to %s",path);
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -551,7 +551,7 @@ static void dfsfile(const char *lname,IUserDescriptor *userDesc, UnsignedArray *
         if (partslist)
             filterParts(tree,*partslist);
         if (!tree) {
-            ERRLOG("%s not found",lname);
+            UERRLOG("%s not found",lname);
             return;
         }
         toXML(tree, str);
@@ -726,7 +726,7 @@ void dfsCheck()
     Owned<IRemoteConnection> conn = querySDS().connect("Files",myProcessSession(),0, daliConnectTimeoutMs);
     if (!conn)
     {
-        ERRLOG("Could not connect to %s","/Files");
+        UERRLOG("Could not connect to %s","/Files");
         return;
     }
 
@@ -740,7 +740,7 @@ static void dfsGroup(const char *name, const char *outputFilename)
     Owned<IGroup> group = queryNamedGroupStore().lookup(name);
     if (!group)
     {
-        ERRLOG("cannot find group %s",name);
+        UERRLOG("cannot find group %s",name);
         return;
     }
     writeGroup(group, name, outputFilename);
@@ -764,7 +764,7 @@ static int clusterGroup(const char *name, const char *outputFilename)
         e->errorMessage(errStr);
         e->Release();
     }
-    ERRLOG("%s", errStr.str());
+    UERRLOG("%s", errStr.str());
     return 1;
 }
 
@@ -775,7 +775,7 @@ static IPropertyTree * selectLevel(IPropertyTree * root, const char * name)
     Owned<IPropertyTree> match = root->getPropTree(xpath);
     if (match)
         return match.getClear();
-    ERRLOG("Path %s not found", name);
+    UERRLOG("Path %s not found", name);
     return nullptr;
 }
 
@@ -854,7 +854,7 @@ static void dfsLs(const char *name, const char *options, bool safe = false)
     Owned<IRemoteConnection> conn = querySDS().connect("Files",myProcessSession(),0, daliConnectTimeoutMs);
     if (!conn)
     {
-        ERRLOG("Could not connect to %s","/Files");
+        UERRLOG("Could not connect to %s","/Files");
         return;
     }
 
@@ -871,7 +871,7 @@ static void dfsmap(const char *lname, IUserDescriptor *user)
 {
     Owned<IDistributedFile> file = queryDistributedFileDirectory().lookup(lname,user);
     if (!file) {
-        ERRLOG("File %s not found",lname);
+        UERRLOG("File %s not found",lname);
         return;
     }
     Owned<IDistributedFilePartIterator> pi = file->getIterator();
@@ -919,7 +919,7 @@ static void dfsunlink(const char *lname, IUserDescriptor *user)
         Owned<IDistributedFile> file = queryDistributedFileDirectory().lookup(lname,user,false,false,true);
         if (!file)
         {
-            ERRLOG("File '%s' not found", lname);
+            UERRLOG("File '%s' not found", lname);
             break;
         }
         Owned<IDistributedSuperFileIterator> iter = file->getOwningSuperFiles();
@@ -931,7 +931,7 @@ static void dfsunlink(const char *lname, IUserDescriptor *user)
         if (sf->removeSubFile(lname,false))
             OUTLOG("removed %s from %s",lname,sf->queryLogicalName());
         else
-            ERRLOG("FAILED to remove %s from %s",lname,sf->queryLogicalName());
+            UERRLOG("FAILED to remove %s from %s",lname,sf->queryLogicalName());
     }
 }
 
@@ -1045,7 +1045,7 @@ static int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user)
     static CIpTable dafilesrvips;
     Owned<IDistributedFile> file=queryDistributedFileDirectory().lookup(name,user);
     if (!file) {
-        ERRLOG("VERIFY: cannot find %s",name);
+        UERRLOG("VERIFY: cannot find %s",name);
         return 1;
     }
     CDateTime filetime;
@@ -1072,7 +1072,7 @@ static int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user)
                 if (!dafilesrvips.verifyDaliFileServer(ep)) {
                     StringBuffer ips;
                     ep.getIpText(ips);
-                    ERRLOG("VERIFY: file %s, cannot run DAFILESRV on %s",name,ips.str());
+                    UERRLOG("VERIFY: file %s, cannot run DAFILESRV on %s",name,ips.str());
                     return 4;
                 }
                 RemoteFilename rfn;
@@ -1122,7 +1122,7 @@ static int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user)
                     item.crc = partfile->getCRC();
                     partfile->getTime(NULL,&item.dt,NULL);
                     if ((item.crc==0)&&!partfile->exists()) {
-                        ERRLOG("VERIFY: does not exist part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
+                        UERRLOG("VERIFY: does not exist part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());
                         ok = false;
                     }
                 }
@@ -1147,7 +1147,7 @@ static int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user)
         item.filename.setPort(0);
         if (item.crc!=item.requiredcrc) {
             StringBuffer rfs;
-            ERRLOG("VERIFY: FAILED %s (%x,%x) file %s",name,item.crc,item.requiredcrc,item.filename.getRemotePath(rfs).str());
+            UERRLOG("VERIFY: FAILED %s (%x,%x) file %s",name,item.crc,item.requiredcrc,item.filename.getRemotePath(rfs).str());
             afor.ok = false;
         }
     }
@@ -1255,8 +1255,8 @@ static void checksuperfile(const char *lfn,bool fix=false)
     lname.makeFullnameQuery(query, DXB_SuperFile, true);
     Owned<IRemoteConnection> conn = querySDS().connect(query.str(),myProcessSession(),fix?RTM_LOCK_WRITE:0, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to %s",lfn);
-        ERRLOG("Superfile %s FAILED",lname.get());
+        UERRLOG("Could not connect to %s",lfn);
+        UERRLOG("Superfile %s FAILED",lname.get());
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -1272,9 +1272,9 @@ static void checksuperfile(const char *lfn,bool fix=false)
                 break;
             StringBuffer s;
             s.appendf("SuperFile %s: corrupt, subfile file part %d is duplicated",lname.get(),i+1);
-            ERRLOG("%s",s.str());
+            UERRLOG("%s",s.str());
             if (!fix||!doFix()) {
-                ERRLOG("Superfile %s FAILED",lname.get());
+                UERRLOG("Superfile %s FAILED",lname.get());
                 return;
             }
             root->removeProp(path.str());
@@ -1283,9 +1283,9 @@ static void checksuperfile(const char *lfn,bool fix=false)
         if (!sub) {
             StringBuffer s;
             s.appendf("SuperFile %s: corrupt, subfile file part %d cannot be found",lname.get(),i+1);
-            ERRLOG("%s",s.str());
+            UERRLOG("%s",s.str());
             if (!fix||!doFix()) {
-                ERRLOG("Superfile %s FAILED",lname.get());
+                UERRLOG("Superfile %s FAILED",lname.get());
                 return;
             }
             fixed = true;
@@ -1303,9 +1303,9 @@ static void checksuperfile(const char *lfn,bool fix=false)
                 subconn.setown(querySDS().connect(subquery.str(),myProcessSession(),0, daliConnectTimeoutMs));
             }
             if (!subconn) {
-                ERRLOG("SuperFile %s is missing sub-file file %s",lname.get(),subname.str());
+                UERRLOG("SuperFile %s is missing sub-file file %s",lname.get(),subname.str());
                 if (!fix||!doFix()) {
-                    ERRLOG("Superfile %s FAILED",lname.get());
+                    UERRLOG("Superfile %s FAILED",lname.get());
                     return;
                 }
                 root->removeTree(sub);
@@ -1336,13 +1336,13 @@ static void checksuperfile(const char *lfn,bool fix=false)
                     sdlname.makeFullnameQuery(sdquery, DXB_SuperFile, true);
                     Owned<IRemoteConnection> sdconn = querySDS().connect(sdquery.str(),myProcessSession(),0, daliConnectTimeoutMs);
                     if (!conn) {
-                        WARNLOG("SubFile %s has missing owner superfile %s",sublname.get(),sdlname.get());
+                        UWARNLOG("SubFile %s has missing owner superfile %s",sublname.get(),sdlname.get());
                     }
                     // make sure superfile exists
                 }
             }
             if (!parentok) {
-                WARNLOG("SubFile %s is missing link to Superfile %s",sublname.get(),lname.get());
+                UWARNLOG("SubFile %s is missing link to Superfile %s",sublname.get(),lname.get());
                 ForEach(*iter) {
                     iter->query().getProp("@name",pname.clear());
                     OUTLOG("Candidate %s",pname.str());
@@ -1368,7 +1368,7 @@ static void checksuperfile(const char *lfn,bool fix=false)
         if (sub) {
             unsigned pn = sub->getPropInt("@num");
             if (pn>subnum) {
-                ERRLOG("SuperFile %s: corrupt, subfile file part %d spurious",lname.get(),pn);
+                UERRLOG("SuperFile %s: corrupt, subfile file part %d spurious",lname.get(),pn);
                 if (fixstate==0)
                 {
                     if (fix&&doFix())
@@ -1392,11 +1392,11 @@ static void checksuperfile(const char *lfn,bool fix=false)
         if (!isEmptyPTree(sub)&&!sub->queryProp("description")) {
             if (fix) {
                 if (!fixed)
-                    ERRLOG("FIX Empty Superfile %s contains non-empty Attr",lname.get());
+                    UERRLOG("FIX Empty Superfile %s contains non-empty Attr",lname.get());
                 root->removeTree(sub);
             }
             else if (sub->getPropInt64("@recordCount")||sub->getPropInt64("@size"))
-                ERRLOG("FAIL Empty Superfile %s contains non-empty Attr sz=%" I64F "d rc=%" I64F "d",lname.get(),sub->getPropInt64("@recordCount"),sub->getPropInt64("@size"));
+                UERRLOG("FAIL Empty Superfile %s contains non-empty Attr sz=%" I64F "d rc=%" I64F "d",lname.get(),sub->getPropInt64("@recordCount"),sub->getPropInt64("@size"));
 
         }
     }
@@ -1472,8 +1472,8 @@ static void checksubfile(const char *lfn)
         conn.setown(querySDS().connect(query.str(),myProcessSession(),0, daliConnectTimeoutMs));
     }
     if (!conn) {
-        ERRLOG("Could not connect to %s",lfn);
-        ERRLOG("Subfile %s FAILED",lname.get());
+        UERRLOG("Could not connect to %s",lfn);
+        UERRLOG("Subfile %s FAILED",lname.get());
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -1488,14 +1488,14 @@ static void checksubfile(const char *lfn)
         sdlname.makeFullnameQuery(sdquery, DXB_SuperFile, true);
         Owned<IRemoteConnection> sdconn = querySDS().connect(sdquery.str(),myProcessSession(),0, daliConnectTimeoutMs);
         if (!conn) {
-            ERRLOG("SubFile %s has missing owner superfile %s",lname.get(),sdlname.get());
+            UERRLOG("SubFile %s has missing owner superfile %s",lname.get(),sdlname.get());
             ok = false;
         }
         else {
             StringBuffer path;
             IPropertyTree *sub = sdconn->queryRoot()->queryPropTree(path.clear().appendf("SubFile[@name=\"%s\"]",lname.get()).str());
             if (!sub) {
-                ERRLOG("Superfile %s is not linked to %s",sdlname.get(),lname.get());
+                UERRLOG("Superfile %s is not linked to %s",sdlname.get(),lname.get());
                 ok = false;
             }
         }
@@ -1720,7 +1720,7 @@ static void dfsscopes(const char *name, IUserDescriptor *user)
         ln.clear().append("SCOPE '").append(iter->query()).append('\'');
         Owned<IRemoteConnection> conn = querySDS().connect(s.str(),myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
         if (!conn)
-            ERRLOG("%s - Could not connect using %s",ln.str(),s.str());
+            UERRLOG("%s - Could not connect using %s",ln.str(),s.str());
         else {
             unsigned files;
             unsigned sfiles;
@@ -1769,7 +1769,7 @@ static void cleanscopes(IUserDescriptor *user)
         dlfn.makeScopeQuery(s.clear(),true);
         Owned<IRemoteConnection> conn = querySDS().connect(s.str(),myProcessSession(),RTM_LOCK_READ, daliConnectTimeoutMs);
         if (!conn)  
-            DBGLOG("Could not connect to '%s' using %s",iter->query(),s.str());
+            UWARNLOG("Could not connect to '%s' using %s",iter->query(),s.str());
         else {
             if (recursiveCheckEmptyScope(*conn->queryRoot())) {
                 toremove.append(iter->query());
@@ -1808,7 +1808,7 @@ static void normalizeFileNames(IUserDescriptor *user, const char *name)
         {
             dFile.setown(queryDistributedFileDirectory().lookup(dlfn, user, true, false, false, nullptr, 30000)); // 30 sec timeout
             if (!dFile)
-                WARNLOG("Could not find file lfn = %s", dlfn.get());
+                UWARNLOG("Could not find file lfn = %s", dlfn.get());
         }
         catch (IException *e)
         {
@@ -1853,7 +1853,7 @@ static void listworkunits(const char *test, const char *min, const char *max)
             const char *tval = strchr(test,'=');
             if (!tval)
             {
-                ERRLOG("missing '=' in %s",test);
+                UERRLOG("missing '=' in %s",test);
                 return;
             }
             StringBuffer prop;
@@ -1984,7 +1984,7 @@ static void holdlock(const char *logicalFile, const char *mode, IUserDescriptor
     Owned<IDistributedFile> file = queryDistributedFileDirectory().lookup(logicalFile, userDesc, write, false, false, NULL, 5000);
     if (!file)
     {
-        ERRLOG("File not found: %s", logicalFile);
+        UERRLOG("File not found: %s", logicalFile);
         return;
     }
     OwnedPtr<DistributedFilePropertyLock> writeLock;
@@ -2028,7 +2028,7 @@ static void workunittimings(const char *wuid)
     path.append("/WorkUnits/").append(wuid);
     Owned<IRemoteConnection> conn = querySDS().connect(path, myProcessSession(), 0, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("WU %s not found",wuid);
+        UERRLOG("WU %s not found",wuid);
         return;
     }
     IPropertyTree *wu = conn->queryRoot();
@@ -2156,7 +2156,7 @@ static void clusterlist()
 {
     Owned<IRemoteConnection> conn = querySDS().connect("/Environment/Software", myProcessSession(), RTM_LOCK_READ, daliConnectTimeoutMs);
     if (!conn) {
-        ERRLOG("Could not connect to /Environment/Software");
+        UERRLOG("Could not connect to /Environment/Software");
         return;
     }
     StringArray list;
@@ -2180,7 +2180,7 @@ static void auditlog(const char *froms, const char *tos, const char *matchs)
         from.setDateString(froms);
     }
     catch (IException *) {
-        ERRLOG("%s: invalid date (format YYYY-MM-DD)",froms);
+        UERRLOG("%s: invalid date (format YYYY-MM-DD)",froms);
         throw;
     }
     CDateTime to;
@@ -2188,7 +2188,7 @@ static void auditlog(const char *froms, const char *tos, const char *matchs)
         to.setDateString(tos);
     }
     catch (IException *) {
-        ERRLOG("%s: invalid date (format YYYY-MM-DD)",tos);
+        UERRLOG("%s: invalid date (format YYYY-MM-DD)",tos);
         throw;
     }
     StringAttrArray res;
@@ -2234,7 +2234,7 @@ static void mpping(const char *eps)
     Owned<ICommunicator> comm = createCommunicator(grp,true);
     unsigned start = msTick();
     if (!comm->verifyConnection(0,60*1000))
-        ERRLOG("MPping %s failed",eps);
+        UERRLOG("MPping %s failed",eps);
     else
         OUTLOG("MPping %s succeeded in %d",eps,msTick()-start);
 }
@@ -2752,7 +2752,7 @@ static void wuidCompress(const char *match, const char *type, bool compress)
 {
     if (0 != stricmp("graph", type))
     {
-        WARNLOG("Currently, only type=='graph' supported.");
+        UWARNLOG("Currently, only type=='graph' supported.");
         return;
     }
     Owned<IRemoteConnection> conn = querySDS().connect("/WorkUnits", myProcessSession(), 0, daliConnectTimeoutMs);
@@ -2914,7 +2914,7 @@ static void migrateFiles(const char *srcGroup, const char *tgtGroup, const char
         else if (strieq("VERBOSE", opt))
             opts = (mg_options)((unsigned)opts | (unsigned)mg_options::verbose);
         else
-            WARNLOG("Unknown option: %s", opt);
+            UWARNLOG("Unknown option: %s", opt);
     }
 
     /*
@@ -3083,7 +3083,7 @@ static void migrateFiles(const char *srcGroup, const char *tgtGroup, const char
                                 if (cluster)
                                     cluster->setProp("@name", _tgtGroup);
                                 else
-                                    WARNLOG("No Cluster found for file: %s", name.str());
+                                    UWARNLOG("No Cluster found for file: %s", name.str());
                             }
                             if (mgOpt(mg_options::createmaps))
                             {
@@ -3155,13 +3155,13 @@ static void migrateFiles(const char *srcGroup, const char *tgtGroup, const char
     }
     if (!success)
     {
-        WARNLOG("Failed to make changes");
+        UWARNLOG("Failed to make changes");
         conn->rollback();
     }
     else if ((unsigned)opts & (unsigned)mg_options::dryrun)
     {
         conn->rollback();
-        WARNLOG("Dry-run, no changes committed. %u files matched", matchingFiles);
+        UWARNLOG("Dry-run, no changes committed. %u files matched", matchingFiles);
     }
     else
         PROGLOG("Committed changes: %u files changed", matchingFiles);
@@ -3310,7 +3310,7 @@ int main(int argc, char* argv[])
                 }
                 else
                 {
-                    ERRLOG("Unknown command %s",cmd);
+                    UERRLOG("Unknown command %s",cmd);
                     ret = 255;
                 }
             }
@@ -3622,7 +3622,7 @@ int main(int argc, char* argv[])
                             dumpWorkunitAttr(params.item(1), nullptr);
                     }
                     else
-                        ERRLOG("Unknown command %s",cmd);
+                        UERRLOG("Unknown command %s",cmd);
                 }
                 catch (IException *e)
                 {

+ 6 - 6
dali/dalidiag/dalidiag.cpp

@@ -137,7 +137,7 @@ void timeQorSDS(bool timeq)
     }
     HiresTimer hrt;
     unsigned last = msTick();
-    PrintLog("last 10   last 100 last 1000 change");
+    DBGLOG("last 10   last 100 last 1000 change");
     for (;;) {
         i++;
         hrt.reset();
@@ -151,7 +151,7 @@ void timeQorSDS(bool timeq)
             sdsroot->setPropInt(subname.str(),i++);
             sdsconn->commit();
             if (!testsdssub.notifysem.wait(1000*60))
-                PrintLog("Notify Timeout!");
+                DBGLOG("Notify Timeout!");
         }
         res[in] = hrt.get();
         if (sz<MAXHISTORY)
@@ -219,7 +219,7 @@ void timeQorSDS(bool timeq)
             }
             last100av = a;
             last100max = m;
-            PrintLog("%.6f, %.6f, %.6f, (%c%c%c)",
+            DBGLOG("%.6f, %.6f, %.6f, (%c%c%c)",
                       last10av,last100av,av,last10inc,last100inc,inc);
             last = msTick();
         }
@@ -235,7 +235,7 @@ void cleanq()
     StringBuffer path("/Queues");
     Owned<IRemoteConnection> conn = querySDS().connect(path.str(),myProcessSession(),RTM_LOCK_WRITE, INFINITE);
     if (!conn) {
-        PrintLog("Could not connect to %s",path.str());
+        UERRLOG("Could not connect to %s",path.str());
         return;
     }
     Owned<IPropertyTree> root = conn->getRoot();
@@ -290,7 +290,7 @@ void partInfo(const char *name,unsigned copy)
         }
     }
     else
-        DBGLOG("ERROR: %s not found", name);
+        UERRLOG("ERROR: %s not found", name);
 }
 
 
@@ -374,7 +374,7 @@ void backupList(const char *cluster)
         }
     }
     else 
-        DBGLOG("ERROR: cluster %s not found", cluster);
+        UERRLOG("Cluster %s not found", cluster);
 }
 
 void filePermissions(const char *lname,const char *username,const char *password)

+ 63 - 63
dali/datest/datest.cpp

@@ -958,7 +958,7 @@ void TestRemoteFile(unsigned part,unsigned of)
 
 void QTest(bool testput)
 {
-    PrintLog("starting QTest %s",testput?"put":"get");
+    PROGLOG("starting QTest %s",testput?"put":"get");
     Owned<INamedQueueConnection> conn = createNamedQueueConnection(0);
     Owned<IQueueChannel> channel = conn->open("testq");
     unsigned i;
@@ -974,7 +974,7 @@ void QTest(bool testput)
     unsigned qn = 0;
     unsigned n;
     for (n=1;n<=128;n++) {
-        PrintLog("start %d",n);
+        PROGLOG("start %d",n);
         unsigned t1 = msTick();
         for (i=0;i<1000;i++) {
             qn++;
@@ -989,8 +989,8 @@ void QTest(bool testput)
                 channel->put(mb);
 #if 1
                 if (i%100==99) {
-                    PrintLog("Put %i - %d on queue",i,channel->probe());
-                    PrintLog("time taken = %d",msTick()-t1);
+                    PROGLOG("Put %i - %d on queue",i,channel->probe());
+                    PROGLOG("time taken = %d",msTick()-t1);
                     t1 = msTick();
                 }
 #endif
@@ -1014,22 +1014,22 @@ void QTest(bool testput)
                 if (sz) {
                     mb.read(sz,buf);
                     if ((buf[0]!=255-buf[sz-1])||(buf[0]!=qn%256)) {
-                        PrintLog("%d: sz=%d, buf[0]=%d, buf[sz-1]=%d  %d %d",qn,sz,(int)buf[0],(int)buf[sz-1],mb.length(),mb.getPos());
+                        PROGLOG("%d: sz=%d, buf[0]=%d, buf[sz-1]=%d  %d %d",qn,sz,(int)buf[0],(int)buf[sz-1],mb.length(),mb.getPos());
                         return;
                     }
                     assertex(buf[0]==255-buf[sz-1]);
 #if 1
                     StringBuffer eps;
                     if (i%100==99) {
-                        PrintLog("Got %s - %d from %s",str.get(),n,node->endpoint().getUrlStr(eps).str());
-                        PrintLog("time taken = %d",msTick()-t1);
+                        PROGLOG("Got %s - %d from %s",str.get(),n,node->endpoint().getUrlStr(eps).str());
+                        PROGLOG("time taken = %d",msTick()-t1);
                         t1 = msTick();
                     }
 #endif
                 }
             }
         }
-        PrintLog("average message of %dK took %dms  ",n,msTick()-t1);
+        PROGLOG("average message of %dK took %dms  ",n,msTick()-t1);
     }
     free(buf);
 }
@@ -1041,12 +1041,12 @@ public:
     Semaphore sem;
     void closed(SessionId id)
     {
-        PrintLog("Session closed %" I64F "d",id);
+        PROGLOG("Session closed %" I64F "d",id);
         sem.signal();
     }
     void aborted(SessionId id)
     {
-        PrintLog("Session aborted %" I64F "d",id);
+        PROGLOG("Session aborted %" I64F "d",id);
         sem.signal();
     }
 };
@@ -1055,7 +1055,7 @@ void Test_Session(const char *eps) // test for sessions
 {
     if (!eps||!*eps) {
         for (unsigned i=0;i<100;i++) {
-            PrintLog("Tick %d",i);
+            PROGLOG("Tick %d",i);
             Sleep(1000);
         }
         return;
@@ -1068,7 +1068,7 @@ void Test_Session(const char *eps) // test for sessions
     for (;;) {
         id = querySessionManager().lookupProcessSession(node);
         if (id) {
-            PrintLog("Session looked up %" I64F "d",id);
+            PROGLOG("Session looked up %" I64F "d",id);
             break;
         }
         Sleep(1000);
@@ -1085,21 +1085,21 @@ void QTest2(bool testput)
     CMessageBuffer mb;
     if (testput) {
         SessionId session = querySessionManager().startSession(0);
-        PrintLog("session started = %" I64F "d",session);
+        PROGLOG("session started = %" I64F "d",session);
         mb.append(session);
         channel->put(mb);
         while (!querySessionManager().sessionStopped(session,1000*5))
-            PrintLog("Still going!");
+            PROGLOG("Still going!");
     }
     else {
         channel->get(mb);
         SessionId session;
         mb.read(session);
-        PrintLog("Started");
+        PROGLOG("Started");
         Sleep(1000*6);
-        PrintLog("stopping session %" I64F "d",session);
+        PROGLOG("stopping session %" I64F "d",session);
         querySessionManager().stopSession(session,false);
-        PrintLog("Stopped");
+        PROGLOG("Stopped");
     }
 }
 
@@ -1114,12 +1114,12 @@ public:
     virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
     {
         static int nno = 0;
-        PrintLog("%d: Notification(%" I64F "d) of %s - flags = %d", nno++, (__int64) id, xpath, flags);
+        PROGLOG("%d: Notification(%" I64F "d) of %s - flags = %d", nno++, (__int64) id, xpath, flags);
         if (valueData)
         {
             StringBuffer data;
             appendURL(&data, (const char *)valueData, valueLen, 0);
-            PrintLog("ValueData = %s", data.str());
+            PROGLOG("ValueData = %s", data.str());
         }
     }
 };
@@ -1141,7 +1141,7 @@ public:
         try
         {
             Owned<IRemoteConnection> conn = querySDS().connect(path, myProcessSession(), RTM_LOCK_WRITE|RTM_LOCK_SUB, 1000000);
-            PrintLog("connecting to %s", path.get());
+            PROGLOG("connecting to %s", path.get());
             if (!conn)
                 throw MakeStringException(-1, "Failed to connect to path %s", path.get());
             IPropertyTree *root = conn->queryRoot();
@@ -1214,12 +1214,12 @@ void testSubscription(bool subscriber, int subs, int comms)
         IMPLEMENT_IINTERFACE;
         virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
         {
-            PrintLog("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
+            PROGLOG("Notification(%" I64F "x) of %s - flags = %d",(__int64) id, xpath, flags);
             if (valueData)
             {
                 StringBuffer data;
                 appendURL(&data, (const char *)valueData, valueLen, 0);
-                PrintLog("ValueData = %s", data.str());
+                PROGLOG("ValueData = %s", data.str());
             }
         }
     };
@@ -1233,18 +1233,18 @@ void testSubscription(bool subscriber, int subs, int comms)
             SubscriptionId *ids = (SubscriptionId *) alloca(sizeof(SubscriptionId)*subscriptions);
             for (i=0; i<subscriptions; i++){
                     subs[i] = new TestSubscription;
-                    PrintLog("Subscribe %d",i);
+                    PROGLOG("Subscribe %d",i);
                     StringBuffer key;
                     key.append("/TESTS/TEST").append(i);
                     ids[i] = querySDS().subscribe(key.str(), *subs[i], true);
             }
-            PrintLog("paused 1");
+            PROGLOG("paused 1");
             getchar();
             for (i=0; i<subscriptions; i++)  {
                     querySDS().unsubscribe(ids[i]);
                     subs[i]->Release();
             }
-            PrintLog("paused");
+            PROGLOG("paused");
             getchar();
     }
     else {
@@ -1262,7 +1262,7 @@ myProcessSession(), RTM_CREATE_QUERY, 1000000);
             }
             conn->commit();
 
-            PrintLog("paused 1");
+            PROGLOG("paused 1");
 
             getchar();
             for (_i=0; _i<commits; _i++) {
@@ -1270,10 +1270,10 @@ myProcessSession(), RTM_CREATE_QUERY, 1000000);
                     StringBuffer key;
                     key.append("TEST").append(i).append("/index");
                     root->setPropInt(key.str(), i);
-                    PrintLog("Commit %d", i);
+                    PROGLOG("Commit %d", i);
                     conn->commit();
             }
-            PrintLog("paused 2");
+            PROGLOG("paused 2");
             getchar();
             for (_i=0; _i<commits; _i++) {
                 i = _i%subscriptions;
@@ -1282,7 +1282,7 @@ myProcessSession(), RTM_CREATE_QUERY, 1000000);
                     root->setPropInt(key.str(), subscriptions-i);            
                     conn->commit();
             }
-            PrintLog("paused 3");
+            PROGLOG("paused 3");
             getchar();
             for (_i=0; _i<commits; _i++) {
                 i = _i%subscriptions;
@@ -1303,7 +1303,7 @@ public:
     CCSub(const char *_conn) : conn(_conn) { }
     virtual void notify()
     {
-        PrintLog("Connection %s changed", conn.get());
+        PROGLOG("Connection %s changed", conn.get());
     }
 };
 
@@ -1384,7 +1384,7 @@ void TestStress()
 
 //
     Owned<IRemoteConnection> conn = querySDS().connect("/Stress", myProcessSession(), RTM_CREATE_QUERY|RTM_LOCK_WRITE, 1000000);
-    PrintLog("connected to /Stress");
+    PROGLOG("connected to /Stress");
 
     IPropertyTree *root = conn->queryRoot();
     unsigned b;
@@ -1417,7 +1417,7 @@ void TestStress()
         ForEach (*rIter) c++;
         if (c>=maxRunning)
         {
-            PrintLog("Pause");
+            PROGLOG("Pause");
             Sleep(pauseWhenBusyDelay);
         }
         else
@@ -1431,19 +1431,19 @@ void TestStress()
         }
     }
 
-    PrintLog("Joining all TSDSThread running threads");
+    PROGLOG("Joining all TSDSThread running threads");
     pool->joinAll();
     pool.clear();
 
     if (queues)
     {
-        PrintLog("Joining putTest");
+        PROGLOG("Joining putTest");
         putTest->join();
-        PrintLog("Joining gettTest");
+        PROGLOG("Joining gettTest");
         getTest->join();
     }
 
-    PrintLog("Finished");
+    PROGLOG("Finished");
 
     return;
 }
@@ -1761,16 +1761,16 @@ void TestExternal()
             free(mem);
         }
 
-        PrintLog("Writing binary to SDS, size=%d", sz);
+        PROGLOG("Writing binary to SDS, size=%d", sz);
         conn->commit();
-        PrintLog("Written binary to SDS, size=%d", sz);
+        PROGLOG("Written binary to SDS, size=%d", sz);
         conn.clear();
 #endif
         conn.setown(querySDS().connect("/Tests", myProcessSession(), RTM_LOCK_READ, 2000*MDELAY));
         root = conn->queryRoot();
 
         MemoryBuffer mb;
-        PrintLog("Reading binary to SDS");
+        PROGLOG("Reading binary to SDS");
         verifyex(root->getPropBin(extPropName.str(), mb));
 
         {
@@ -1781,16 +1781,16 @@ void TestExternal()
             sz = mb.length();
             fileIO->write(0, mb.length(), mb.toByteArray());
         }
-        PrintLog("Read back binary, size=%d", sz);
+        PROGLOG("Read back binary, size=%d", sz);
 
-        PrintLog("Writing large string");
+        PROGLOG("Writing large string");
         char *str = (char *)test;
         str[32000] = '\0';
         root->setProp("largeString", str);
 
         const char *b = root->queryProp("@sds:ext");
         conn->commit();
-        PrintLog("Written large string");
+        PROGLOG("Written large string");
 
         conn.clear();
     }
@@ -1799,19 +1799,19 @@ void TestExternal()
     root = conn->queryRoot();
 
     root->setPropBin(extPropName.str(), UNDERTHRESHOLD, test);
-    PrintLog("setting binary to small, size=%d", UNDERTHRESHOLD);
+    PROGLOG("setting binary to small, size=%d", UNDERTHRESHOLD);
     conn->commit();
-    PrintLog("set binary to small, size=%d", UNDERTHRESHOLD);
+    PROGLOG("set binary to small, size=%d", UNDERTHRESHOLD);
     root->setPropBin(extPropName.str(), 1024, test);
-    PrintLog("setting binary to big, size=%d", OVERTHRESHOLD);
+    PROGLOG("setting binary to big, size=%d", OVERTHRESHOLD);
     conn->commit();
-    PrintLog("set binary to big, size=%d", OVERTHRESHOLD);
+    PROGLOG("set binary to big, size=%d", OVERTHRESHOLD);
 
 #ifdef REMOVEEXT
     root->removeProp(extPropName.str());
-    PrintLog("removing binary to small, size=%d", UNDERTHRESHOLD);
+    PROGLOG("removing binary to small, size=%d", UNDERTHRESHOLD);
     conn->commit();
-    PrintLog("removed prop");
+    PROGLOG("removed prop");
 #endif
 }
 
@@ -1898,13 +1898,13 @@ void TestSubLocks()
         CSubTest * t = new CSubTest(paths.item(fastRand()%paths.ordinality()));
         threads.append(* t);
     }
-    PrintLog("joining");
+    PROGLOG("joining");
     for (i=0; i<num; i++)
     {
         threads.item(i).join();
     }
 
-    PrintLog("SubLocks test done");
+    PROGLOG("SubLocks test done");
 }
 
 void TestSDS1()
@@ -1970,7 +1970,7 @@ void TestSDS1()
     while (diter->first())
     {
         IPropertyTree &child = diter->query();
-        PrintLog("child = %s", child.queryName());
+        PROGLOG("child = %s", child.queryName());
         root->removeTree(&child);
     }
 
@@ -2172,7 +2172,7 @@ void TestSDS1()
 
     toXML(root, xml.clear());
 
-    PrintLog("previously committed file : %s", xml.str());
+    PROGLOG("previously committed file : %s", xml.str());
 
     conn->Release();
 #endif
@@ -2232,7 +2232,7 @@ void TestSDS1()
     sub = root->queryPropTree("sub1");
 
     toXML(sub, xml.clear());
-    PrintLog("hello = %s", xml.str());
+    PROGLOG("hello = %s", xml.str());
 
     conn->Release();
 #endif
@@ -2679,7 +2679,7 @@ void TestSDS3(IGroup *group)
     {
         pool->start(&params, NULL, 50000); // keep starting them as they become available
     }
-    PrintLog("Joining all TSDSThread running threads");
+    PROGLOG("Joining all TSDSThread running threads");
     pool->joinAll();
     pool.clear();
 }
@@ -2801,7 +2801,7 @@ void TestNodeSubs()
         pool->start(NULL);
     }
 
-    PrintLog("Joining all TSDSThread running threads");
+    PROGLOG("Joining all TSDSThread running threads");
     pool->joinAll();
     pool.clear();
 
@@ -3042,12 +3042,12 @@ void TestLocks()
     for (unsigned i=0;i<100;i++) {
         Sleep(getRandom()%3000);
         bool excl = (getRandom()%3)==0;
-        PrintLog("getting %s lock",excl?"exclusive":"non-exclusive");
+        PROGLOG("getting %s lock",excl?"exclusive":"non-exclusive");
         dl->lock(excl);
-        PrintLog("got %s lock",excl?"exclusive":"non-exclusive");
+        PROGLOG("got %s lock",excl?"exclusive":"non-exclusive");
         Sleep(getRandom()%5000);
         dl->unlock();
-        PrintLog("release %s lock",excl?"exclusive":"non-exclusive");
+        PROGLOG("release %s lock",excl?"exclusive":"non-exclusive");
     }
     dl->Release();
     comm->Release();
@@ -3110,11 +3110,11 @@ public:
             for (;;) {
                 Sleep(getRandom()%1000);
                 unsigned i = getRandom()%NCCS;
-                PrintLog("%s locking %d",name,i);
+                PROGLOG("%s locking %d",name,i);
                 CCS[i]->enter();
                 Sleep(getRandom()%1000);
                 unsigned j = getRandom()%NCCS;
-                PrintLog("%s locking %d",name,j);
+                PROGLOG("%s locking %d",name,j);
                 CCS[j]->enter();
                 if (getRandom()%2==0) {
                     unsigned t = i;
@@ -3122,10 +3122,10 @@ public:
                     j = t;
                 }
                 Sleep(getRandom()%1000);
-                PrintLog("%s unlocking %d",name,j);
+                PROGLOG("%s unlocking %d",name,j);
                 CCS[j]->leave();
                 Sleep(getRandom()%1000);
-                PrintLog("%s unlocking %d",name,i);
+                PROGLOG("%s unlocking %d",name,i);
                 CCS[i]->leave();
             }
         }
@@ -3380,7 +3380,7 @@ int main(int argc, char* argv[])
         if(argc >= 3)
             TestCopyFile(argv[1], argv[2]);
         else
-            DBGLOG("TestCopyFile(src-file, dst-file) missing arguments");
+            PROGLOG("TestCopyFile(src-file, dst-file) missing arguments");
         return 0;
 #endif
         if (argc<2) {

+ 3 - 3
dali/datest/dfuwutest.cpp

@@ -45,7 +45,7 @@ void testAbort(const char *wuid)
         wu->requestAbort();
     }
     else
-        ERRLOG("WUID %s not found", wuid);
+        UERRLOG("WUID %s not found", wuid);
 }
 
 StringBuffer& constructFileMask(const char* filename, StringBuffer& filemask)
@@ -421,7 +421,7 @@ IFileDescriptor *createRoxieFileDescriptor(const char *cluster, const char *lfn,
         grpname.append("__servers");
     Owned<IGroup> grp = queryNamedGroupStore().lookup(grpname.str());
     if (!grp) {
-        ERRLOG("Logical group %s not found",grpname.str());
+        UERRLOG("Logical group %s not found",grpname.str());
         return NULL;
     }
     Owned<IFileDescriptor> ret = createFileDescriptor();
@@ -432,7 +432,7 @@ IFileDescriptor *createRoxieFileDescriptor(const char *cluster, const char *lfn,
         dirxpath.appendf("Software/RoxieCluster[@name=\"%s\"]/Roxie%sProcess[@channel=\"%d\"]/@dataDirectory",cluster,servers?"Server":"Slave",i+1);
         const char * dir = envroot->queryProp(dirxpath.str());
         if (!dir) {
-            ERRLOG("dataDirectory not specified");
+            UERRLOG("dataDirectory not specified");
             return NULL;
         }
         makePhysicalPartName(lfn,i+1,width,filename,false,DFD_OSdefault,dir);

+ 6 - 6
dali/datest/floodtest.cpp

@@ -367,7 +367,7 @@ void nodeInfo::sendError(const char *errstr1,const char *errstr2)
     StringBuffer err(errstr1);
     if (errstr2)
         err.append(" ").append(errstr2);
-    ERRLOG("%s",err.str());
+    UERRLOG("%s",err.str());
     MemoryBuffer mb;
     mb.append(FLOODTEST_ERROR).append(myrank).append(err.str());
     schannel->put(mb);
@@ -415,12 +415,12 @@ void floodtestClient(const char *grpname,unsigned ngb)
             PROGLOG("Started");
         }
         else {
-            ERRLOG("Failed to find node in group");
+            UERRLOG("Failed to find node in group");
             mb.append(FLOODTEST_ERROR).append(myrank).append("Failed to find node in group");
         }
     }
     else {
-        ERRLOG("Failed to find node in group");
+        UERRLOG("Failed to find node in group");
         mb.append(FLOODTEST_ERROR).append(myrank).append("Failed to find group");
     }
     IRand->seed(myrank);
@@ -663,7 +663,7 @@ bool runSlaves(IGroup *grp,const char *progname,const char *daliserver,const cha
                 else {
                     StringBuffer ips;
                     ip.getText(ips);
-                    ERRLOG("Failed to run slave on %d (%s)",idx+1,ips.str());
+                    UERRLOG("Failed to run slave on %d (%s)",idx+1,ips.str());
                     error = true;
                 }
             }
@@ -793,7 +793,7 @@ void floodtestServer(const char *exename,const char *daliserver,const char *grpn
     bool loopback = (ngb==0);
     Owned<IGroup> group = queryNamedGroupStore().lookup(grpname);
     if (!group) {
-        ERRLOG("Cannot find group %s",grpname);
+        UERRLOG("Cannot find group %s",grpname);
         return;
     }
     Owned<CLoopbackServer> lbserver;
@@ -845,7 +845,7 @@ void floodtestServer(const char *exename,const char *daliserver,const char *grpn
             StringAttr msg;
             mb.read(msg);
             StringBuffer url;
-            ERRLOG("%3d (%s): %s\n",r+1,group->queryNode(r).endpoint().getUrlStr(url).str(),msg.get());
+            IERRLOG("%3d (%s): %s\n",r+1,group->queryNode(r).endpoint().getUrlStr(url).str(),msg.get());
         }
         else if (fn==FLOODTEST_CONNECTED) {
             if (setState(group,"Connected",r,connected)) {

+ 1 - 1
dali/daunittest/daunittest.cpp

@@ -69,7 +69,7 @@ public:
         CPPUNIT_NS::Exception *e = failure.thrownException();
         if (e)
             s.appendf(" %s %s",e->message().shortDescription().c_str(),e->message().details().c_str());
-        ERRLOG("%s",s.str());
+        UERRLOG("%s",s.str());
         m_lastTestFailed  = true;
     }
     

+ 2 - 2
dali/dfu/dfu2.cpp

@@ -148,7 +148,7 @@ int main(int argc, const char *argv[])
             e->Release();
         }
         catch (const char *s) {
-            ERRLOG("DFU: %s",s);
+            IERRLOG("DFU: %s",s);
         }
     }
     catch(IException *e){ 
@@ -159,7 +159,7 @@ int main(int argc, const char *argv[])
         e->Release();
     }
     catch (const char *s) {
-        ERRLOG("DFU: %s",s);
+        IERRLOG("DFU: %s",s);
     }
     
     closeEnvironment();

+ 11 - 11
dali/dfu/dfurepl.cpp

@@ -137,7 +137,7 @@ struct ReplicatePartItem: extends CInterface
             ReplicatePartCopyItem &dstcopy = copies.item(dst.item(i2));
             if (i3>=src.ordinality()) {
                 if (i3==0) {
-                    ERRLOG(LOGPFX "Cannot find copy for %s",dstcopy.file->queryFilename());
+                    OERRLOG(LOGPFX "Cannot find copy for %s",dstcopy.file->queryFilename());
                     dstcopy.state = RPCS_failed;
                 }
                 else
@@ -251,29 +251,29 @@ struct ReplicateFileItem: extends CInterface
         StringBuffer tmp;
         const char *lfn = dlfn.get();
         if (dlfn.isExternal()) {
-            ERRLOG(LOGPFX "Cannot replicate external file %s",lfn);
+            OERRLOG(LOGPFX "Cannot replicate external file %s",lfn);
             return;
         }
         if (dlfn.isForeign()) {
-            ERRLOG(LOGPFX "Cannot replicate foreign file %s",lfn);
+            OERRLOG(LOGPFX "Cannot replicate foreign file %s",lfn);
             return;
         }
         Owned<IDistributedFile> dfile = queryDistributedFileDirectory().lookup(dlfn,userdesc);
         if (!dfile) {
-            WARNLOG(LOGPFX "Cannot find file %s, perhaps deleted",lfn);
+            UWARNLOG(LOGPFX "Cannot find file %s, perhaps deleted",lfn);
             return;
         }
         CDateTime dt;       
         dfile->getModificationTime(dt);     // check not modified while queued
         if (!filedt.equals(dt)) {
             dt.getString(filedt.getString(tmp.clear()).append(','));
-            WARNLOG(LOGPFX "File %s changed (%s), ignoring replicate",lfn,tmp.str());
+            UWARNLOG(LOGPFX "File %s changed (%s), ignoring replicate",lfn,tmp.str());
             return;
         }
         // see if already replicating
         Owned<IRemoteConnection> pconn = querySDS().connect("DFU/Replicating", myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_QUERY,  SDS_TIMEOUT);
         if (!pconn.get()) {
-            ERRLOG(LOGPFX "Connect to DFU/Replicating %s failed",lfn);
+            OERRLOG(LOGPFX "Connect to DFU/Replicating %s failed",lfn);
             return;
         }
         StringBuffer xpath;
@@ -284,16 +284,16 @@ struct ReplicateFileItem: extends CInterface
             pconn->queryRoot()->getProp(xpath.str(),tmp.clear());
             dt.setDateString(tmp.str());
             if (filedt.equals(dt)) {
-                WARNLOG(LOGPFX "Already replicating %s, ignoring",lfn);
+                UWARNLOG(LOGPFX "Already replicating %s, ignoring",lfn);
                 return;
             }
             else
-                WARNLOG(LOGPFX "Already replicating %s, contining",lfn);
+                UWARNLOG(LOGPFX "Already replicating %s, contining",lfn);
         }
         // now as long as SDS doesn't lock children this should be OK
         conn.setown(querySDS().connect("DFU/Replicating/File", myProcessSession(), RTM_CREATE_ADD | RTM_LOCK_READ, 5*60*1000));
         if (!conn.get()) {
-            ERRLOG(LOGPFX "Create of DFU/Replicating/File %s failed",lfn);
+            OERRLOG(LOGPFX "Create of DFU/Replicating/File %s failed",lfn);
             return;
         }
         genUUID(tmp.clear(),true);  // true for windows
@@ -340,11 +340,11 @@ struct ReplicateFileItem: extends CInterface
                     abort = false;
                 else {
                     newfiledt.getString(filedt.getString(tmp.clear()).append(','));
-                    WARNLOG(LOGPFX "File %s changed (%s)",lfn,tmp.str());
+                    UWARNLOG(LOGPFX "File %s changed (%s)",lfn,tmp.str());
                 }
             }
             else 
-                WARNLOG(LOGPFX "Cannot find file %s, perhaps deleted",lfn);
+                UWARNLOG(LOGPFX "Cannot find file %s, perhaps deleted",lfn);
         }
         catch (IException *e) { // actually don't expect (unless maybe dali down or something)
             EXCLOG(e,LOGPFX "Replicate error(3)");

+ 7 - 7
dali/dfu/dfurun.cpp

@@ -188,7 +188,7 @@ class CDFUengine: public CInterface, implements IDFUengine
             mask.appendf("Queue[@name=\"%s\"][1]",qname);
             IPropertyTree *t =  serverstatus->queryProperties()->queryPropTree(mask.str());
             if (!t) {
-                WARNLOG("DFUWU: setRunningStatus queue %s not set",qname);
+                OWARNLOG("DFUWU: setRunningStatus queue %s not set",qname);
                 return;
             }
             mask.clear().appendf("Job[@wuid=\"%s\"]",wuid);
@@ -281,7 +281,7 @@ class CDFUengine: public CInterface, implements IDFUengine
                                 onCycle();
                             break;
                         default:
-                            ERRLOG("DFURUN Unknown mode");
+                            OERRLOG("DFURUN Unknown mode");
                             break;
                         }
                     }
@@ -707,7 +707,7 @@ public:
             StringBuffer dir;
             RemoteFilename rfn;
             if (fdesc->numParts()!=1) {
-                ERRLOG("MONITOR: monitor file incorrectly specified");
+                OERRLOG("MONITOR: monitor file incorrectly specified");
                 if (raiseexception)
                     throw MakeStringException(-1,"MONITOR: monitor file incorrectly specified");
                 return true;
@@ -719,7 +719,7 @@ public:
             dirfn.setPath(rfn.queryEndpoint(),dir.str());
             Owned<IFile> dirf = createIFile(dirfn);
             if (!dirf||(dirf->isDirectory()!=foundYes)) {
-                ERRLOG("MONITOR: %s is not a directory in DFU WUID %s",dir.str(),wu->queryId());
+                OERRLOG("MONITOR: %s is not a directory in DFU WUID %s",dir.str(),wu->queryId());
                 if (raiseexception)
                     throw MakeStringException(-1,"MONITOR: %s is not a directory in DFU WUID %s",dir.str(),wu->queryId());
                 return true;
@@ -1076,7 +1076,7 @@ public:
         Owned<IDFUWorkUnitFactory> factory = getDFUWorkUnitFactory();
         Owned<IDFUWorkUnit> wu = factory->updateWorkUnit(dfuwuid,false);
         if (!wu) {
-            WARNLOG("DFURUN: Workunit %s not found",dfuwuid);
+            OWARNLOG("DFURUN: Workunit %s not found",dfuwuid);
             return DFUstate_unknown;
         }
         if (dfuServerName.length())
@@ -1117,12 +1117,12 @@ public:
             progress->setState(DFUstate_aborted);
             /* no break */
         case DFUstate_aborted:
-            WARNLOG("DFURUN: Workunit %s aborted",dfuwuid);
+            IWARNLOG("DFURUN: Workunit %s aborted",dfuwuid);
             return DFUstate_aborted;
         case DFUstate_queued:
             break;
         default:
-            WARNLOG("DFURUN: Workunit %s unexpected state %d",dfuwuid,(int)s);
+            OWARNLOG("DFURUN: Workunit %s unexpected state %d",dfuwuid,(int)s);
             return s;
         }
         bool replicating=false;

+ 1 - 1
dali/dfu/dfuserver.cpp

@@ -260,7 +260,7 @@ int main(int argc, const char *argv[])
         e->Release();
     }
     catch (const char *s) {
-        WARNLOG("DFU: %s",s);
+        OWARNLOG("DFU: %s",s);
     }
 
     delete serverstatus;

+ 2 - 2
dali/dfu/dfuutil.cpp

@@ -203,7 +203,7 @@ public:
                         break;
                 }
                 if (!got) {
-                    ERRLOG("copyLogicalFile: part %d missing any copies",pn+1);
+                    OERRLOG("copyLogicalFile: part %d missing any copies",pn+1);
                     if (!exc.get())
                         exc.setown(MakeStringException(-1,"copyLogicalFile: part %d missing any copies",pn+1));
                     return;
@@ -348,7 +348,7 @@ public:
                         break;
                 }
                 if (cpy>=nc) {
-                    ERRLOG("replicateLogicalFile: %s part %d missing any copies",filename,pn+1);
+                    OERRLOG("replicateLogicalFile: %s part %d missing any copies",filename,pn+1);
                     if (!exc.get())
                         exc.setown(MakeStringException(-1,"replicateLogicalFile: %s part %d missing any copies",filename,pn+1));
                     return;

+ 4 - 4
dali/dfu/dfuwu.cpp

@@ -1124,7 +1124,7 @@ public:
                 if (grp)
                     n = grp->ordinality();
                 else {
-                    ERRLOG("DFUWU: Logical group %s not found",s.str());
+                    OERRLOG("DFUWU: Logical group %s not found",s.str());
                     return 0;
                 }
                 ClusterPartDiskMapSpec mspec;
@@ -2908,7 +2908,7 @@ class CDFUWorkUnitFactory : implements IDFUWorkUnitFactory, implements ISDSSubsc
             if (ok)
                 break;
             if (i%10==9)
-                WARNLOG("CDFUWorkUnitFactory: Subscription(%d,%" I64F "d) busy %s",i,(__int64)atid,xpath?xpath:"");
+                DBGLOG("CDFUWorkUnitFactory: Subscription(%d,%" I64F "d) busy %s",i,(__int64)atid,xpath?xpath:"");
             CriticalUnblock unblock(proxylock);
             Sleep(i*10);
             if (i==99)
@@ -3162,7 +3162,7 @@ dfuwu_decl unsigned queuedJobs(const char *queuename,StringAttrArray &wulist)
     catch(IException* e){
         StringBuffer msg;
         e->errorMessage(msg);
-        ERRLOG("DFUWU runningJobs(%s) %s",queuename,msg.str());
+        IERRLOG("DFUWU runningJobs(%s) %s",queuename,msg.str());
         e->Release();
     }
     try{
@@ -3182,7 +3182,7 @@ dfuwu_decl unsigned queuedJobs(const char *queuename,StringAttrArray &wulist)
     catch(IException* e){
         StringBuffer msg;
         e->errorMessage(msg);
-        ERRLOG("DFUWU queuedJobs(%s) %s",queuename,msg.str());
+        IERRLOG("DFUWU queuedJobs(%s) %s",queuename,msg.str());
         e->Release();
     }
     return ret;

+ 15 - 15
dali/dfuXRefLib/XRefFilesNode.cpp

@@ -103,7 +103,7 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp
     Owned<IGroup> group = queryNamedGroupStore().lookup(clustername);
     if (!group)
     {
-        ERRLOG("%s cluster not found",clustername);
+        OERRLOG("%s cluster not found",clustername);
         errstr.appendf("ERROR: %s cluster not found",clustername);
         return false;
     }
@@ -130,7 +130,7 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp
                 if (group->rank(ep)==RANK_NULL)
                 {
                     StringBuffer eps;
-                    ERRLOG("%s %s Part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getUrlStr(eps).str(),clustername);
+                    OERRLOG("%s %s Part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getUrlStr(eps).str(),clustername);
                     errstr.appendf("ERROR: %s %s part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getUrlStr(eps).str(),clustername);
                     return false;
                 }
@@ -138,7 +138,7 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp
                 {
                     if ((pn-1+rep)%n==gn)
                     {
-                        ERRLOG("Logical file for %s exists (part not orphaned?)",title);
+                        OERRLOG("Logical file for %s exists (part not orphaned?)",title);
                         errstr.appendf("Logical file for %s exists (part not orphaned?)",title);
                         return false;
                     }
@@ -158,7 +158,7 @@ bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc,
     IPropertyTree* subBranch = FindNode(Partmask);
     if (!subBranch)
     {
-        ERRLOG("%s branch not found",Partmask);
+        OERRLOG("%s branch not found",Partmask);
         errstr.appendf("ERROR: %s branch not found",Partmask);
         return false;
     }
@@ -237,7 +237,7 @@ bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc,
                     {
                         StringBuffer errname;
                         files.item(idx).getRemotePath(errname);
-                        ERRLOG("Could not delete file %s",errname.str());
+                        OERRLOG("Could not delete file %s",errname.str());
                         CriticalBlock block(crit);
                         if (errstr.length())
                             errstr.append('\n');
@@ -274,7 +274,7 @@ bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc,
     afor.For(files.ordinality(),10,false,true);
     if (!RemoveTreeNode(Partmask))                 
     {
-        ERRLOG("Error Removing XRef Branch %s",Partmask);
+        OERRLOG("Error Removing XRef Branch %s",Partmask);
         return false;
     }
     m_bChanged = true;
@@ -291,7 +291,7 @@ bool CXRefFilesNode::RemoveLogical(const char* LogicalName,IUserDescriptor* udes
     IPropertyTree* pLogicalFileNode =  queryDataTree().getBranch(xpath.str());
     if (!pLogicalFileNode)
     {
-        ERRLOG("Branch %s not found",xpath.str());
+        OERRLOG("Branch %s not found",xpath.str());
         errstr.appendf("Branch %s not found",xpath.str());
         return false;
     }
@@ -299,13 +299,13 @@ bool CXRefFilesNode::RemoveLogical(const char* LogicalName,IUserDescriptor* udes
         return false;
     if (queryDistributedFileDirectory().existsPhysical(LogicalName,udesc))
     {
-        ERRLOG("Logical file %s all parts exist (not lost?))",LogicalName);
+        OERRLOG("Logical file %s all parts exist (not lost?))",LogicalName);
         errstr.appendf("Logical file %s all parts exist (not lost?))",LogicalName);
         return false;
     }
     if (!queryDataTree().removeTree(pLogicalFileNode))
     {
-        ERRLOG("Removing XRef Branch %s", xpath.str());
+        OERRLOG("Removing XRef Branch %s", xpath.str());
         errstr.appendf("Removing XRef Branch %s", xpath.str());
         return false;
     }
@@ -319,7 +319,7 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
     IPropertyTree* subBranch = FindNode(Partmask);
     if (!subBranch)
     {
-        ERRLOG("%s node not found",Partmask);
+        OERRLOG("%s node not found",Partmask);
         errstr.appendf("ERROR: %s node not found",Partmask);
         return false;
     }
@@ -329,14 +329,14 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
     StringBuffer logicalName;
     if (!LogicalNameFromMask(Partmask,logicalName))
     {
-        ERRLOG("%s - could not attach",Partmask);
+        OERRLOG("%s - could not attach",Partmask);
         errstr.appendf("ERROR: %s - could not attach",Partmask);
         return false;
     }
 
     if (queryDistributedFileDirectory().exists(logicalName.str(),udesc))
     {
-        ERRLOG("Logical File %s already Exists. Can not reattach to Dali",logicalName.str());
+        OERRLOG("Logical File %s already Exists. Can not reattach to Dali",logicalName.str());
         errstr.appendf("Logical File %s already Exists. Can not reattach to Dali",logicalName.str());
         return false;
     }
@@ -378,7 +378,7 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
         if (!_node||!*_node)
             _node = part.queryProp("RNode[1]");
         if (!*_node||!*_node) {
-            ERRLOG("%s - could not attach (missing part info)",Partmask);
+            OERRLOG("%s - could not attach (missing part info)",Partmask);
             errstr.appendf("ERROR: %s - could not attach (missing part info)",Partmask);
             return false;
         }
@@ -400,7 +400,7 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
         else if (isCompressed != partCompressed)
         {
             VStringBuffer err("%s - could not attach (mixed compressed/non-compressed physical parts detected)", Partmask);
-            ERRLOG("%s", err.str());
+            OERRLOG("%s", err.str());
             errstr.append(err.str());
             return false;
         }
@@ -426,7 +426,7 @@ bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc,
     dFile->attach(logicalName.str(),udesc);
 
     if (!RemoveTreeNode(Partmask)) {                   
-        ERRLOG("Removing XRef Branch %s",Partmask);
+        OERRLOG("Removing XRef Branch %s",Partmask);
         errstr.appendf("ERROR: Removing XRef Branch %s",Partmask);
         return false;
     }

+ 4 - 4
dali/dfuXRefLib/XRefNodeManager.cpp

@@ -131,7 +131,7 @@ CXRefNode::CXRefNode(IPropertyTree* pTreeRoot)
     }
     catch(...)
     {
-        ERRLOG("Error in creation of XRefNode...");
+        IERRLOG("Error in creation of XRefNode...");
     }
 }
 
@@ -408,7 +408,7 @@ bool CXRefNode::removeEmptyDirectories(StringBuffer &errstr)
         return false;
     Owned<IGroup> group = queryNamedGroupStore().lookup(clustername);
     if (!group) {
-        ERRLOG("%s cluster not found",clustername);
+        OERRLOG("%s cluster not found",clustername);
         errstr.appendf("ERROR: %s cluster not found",clustername);
         return false;
     }
@@ -449,7 +449,7 @@ bool CXRefNode::removeEmptyDirectories(StringBuffer &errstr)
                     if (deleteEmptyDir(dir))
                         PROGLOG("Removed '%s'",dir->queryFilename());
                     else
-                        WARNLOG("Could not remove '%s'",dir->queryFilename());
+                        UWARNLOG("Could not remove '%s'",dir->queryFilename());
                 }
                 catch (IException *e)
                 {
@@ -588,7 +588,7 @@ void CXRefNode::progress(const char *text)
 }
 void CXRefNode::error(const char *text)
 {
-    DBGLOG("ERROR: %s\n",text);
+    OERRLOG("ERROR: %s\n",text);
     setStatus(text);
     commit();
 }

+ 7 - 7
dali/dfuXRefLib/dfuxreflib.cpp

@@ -341,7 +341,7 @@ static unsigned short getDafsPort(const SocketEndpoint &ep,unsigned &numfails,Cr
     StringBuffer err("Failed to connect to DaFileSrv on ");
     ep.getIpText(err);
 #ifdef _WIN32
-    ERRLOG("%s",err.str());
+    OERRLOG("%s",err.str());
     if (sect) {
         CriticalBlock block(*sect);
         numfails++;
@@ -520,7 +520,7 @@ public:
             msgcallback->progress(cbline.str());
         }
         else {
-            ERRLOG("%s: %s",lname,line.str());
+            OERRLOG("%s: %s",lname,line.str());
         }
     }
 
@@ -543,7 +543,7 @@ public:
             msgcallback->progress(cbline.str());
         }
         else {
-            WARNLOG("%s: %s",lname,line.str());
+            UWARNLOG("%s: %s",lname,line.str());
         }
     }
 
@@ -1361,7 +1361,7 @@ struct TimedBlock
     {
         unsigned elapsed=msTick()-start;
         if (elapsed>limit)
-            PrintLog("TIME: %s took %dms - line(%d)",msg,elapsed,ln);
+            DBGLOG("TIME: %s took %dms - line(%d)",msg,elapsed,ln);
         free(msg);
     }
 };
@@ -2693,7 +2693,7 @@ IPropertyTree *  runXRef(unsigned nclusters,const char **clusters,IXRefProgressC
         if (callback)
             callback->error(s.str());
         else
-            ERRLOG("%s",s.str());
+            IERRLOG("%s",s.str());
     }
     return ret;
 }
@@ -2720,7 +2720,7 @@ IPropertyTree * runXRefCluster(const char *cluster,IXRefNode *nodeToUpdate)
         if (callback)
             callback->error(s.str());
         else
-            ERRLOG("%s",s.str());
+            IERRLOG("%s",s.str());
     }
     if(ret)
     {
@@ -2782,7 +2782,7 @@ IPropertyTree * RunProcess(XRefCmd cmd, unsigned nclusters,const char **clusters
                 Owned<IXRefNodeManager> XRefNodeManager = CreateXRefNodeFactory();
                 Owned<IConstXRefNode> xRefNode = XRefNodeManager->getXRefNode(cluster);
                 if (!xRefNode)
-                    WARNLOG("Cannot find XREF info for cluster: %s", cluster);
+                    UWARNLOG("Cannot find XREF info for cluster: %s", cluster);
                 else
                 {
                     StringBuffer partMask;

+ 12 - 12
dali/ft/daft.cpp

@@ -46,9 +46,9 @@ typedef Owned<IFileSprayer> OwnedIFileSprayer;
 void CDistributedFileSystem::copy(IDistributedFile * from, IDistributedFile * to, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
     if (to->queryLogicalName())
-        LOG(MCdebugInfo, unknownJob, "DFS: copy(%s,%s)", from->queryLogicalName(), to->queryLogicalName());
+        DBGLOG("DFS: copy(%s,%s)", from->queryLogicalName(), to->queryLogicalName());
     else
-        LOG(MCdebugInfo, unknownJob, "DFS: copy(%s)", from->queryLogicalName());
+        DBGLOG("DFS: copy(%s)", from->queryLogicalName());
 
     OwnedIFileSprayer sprayer = createFileSprayer(options, recovery, recoveryConnection, wuid);
 
@@ -64,7 +64,7 @@ void CDistributedFileSystem::copy(IDistributedFile * from, IDistributedFile * to
 void CDistributedFileSystem::exportFile(IDistributedFile * from, IFileDescriptor * to, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
     StringBuffer temp;
-    LOG(MCdebugInfo, unknownJob, "DFS: export(%s,%s)", from->queryLogicalName(), to->getTraceName(temp).str());
+    DBGLOG("DFS: export(%s,%s)", from->queryLogicalName(), to->getTraceName(temp).str());
 
     OwnedIFileSprayer sprayer = createFileSprayer(options, recovery, recoveryConnection, wuid);
     sprayer->setOperation(dfu_export);
@@ -80,9 +80,9 @@ void CDistributedFileSystem::import(IFileDescriptor * from, IDistributedFile * t
 {
     StringBuffer temp;
     if (to->queryLogicalName())
-        LOG(MCdebugInfo, unknownJob, "DFS: import(%s,%s)", from->getTraceName(temp).str(), to->queryLogicalName());
+        DBGLOG("DFS: import(%s,%s)", from->getTraceName(temp).str(), to->queryLogicalName());
     else
-        LOG(MCdebugInfo, unknownJob, "DFS: import(%s)", from->getTraceName(temp).str());
+        DBGLOG("DFS: import(%s)", from->getTraceName(temp).str());
 
     OwnedIFileSprayer sprayer = createFileSprayer(options, recovery, recoveryConnection, wuid);
     sprayer->setOperation(dfu_import);
@@ -97,9 +97,9 @@ void CDistributedFileSystem::import(IFileDescriptor * from, IDistributedFile * t
 void CDistributedFileSystem::move(IDistributedFile * from, IDistributedFile * to, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
     if (to->queryLogicalName())
-        LOG(MCdebugInfo, unknownJob, "DFS: move(%s,%s)", from->queryLogicalName(), to->queryLogicalName());
+        DBGLOG("DFS: move(%s,%s)", from->queryLogicalName(), to->queryLogicalName());
     else
-        LOG(MCdebugInfo, unknownJob, "DFS: move(%s)", from->queryLogicalName());
+        DBGLOG("DFS: move(%s)", from->queryLogicalName());
 
     OwnedIFileSprayer sprayer = createFileSprayer(options, recovery, recoveryConnection, wuid);
     sprayer->setOperation(dfu_move);
@@ -115,7 +115,7 @@ void CDistributedFileSystem::move(IDistributedFile * from, IDistributedFile * to
 
 void CDistributedFileSystem::replicate(IDistributedFile * from, IGroup *destgroup, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
-    LOG(MCdebugInfo, unknownJob, "DFS: replicate(%s)", from->queryLogicalName());
+    DBGLOG("DFS: replicate(%s)", from->queryLogicalName());
 
     FileSprayer sprayer(options, recovery, recoveryConnection, wuid);
     sprayer.setOperation(dfu_replicate_distributed);
@@ -131,7 +131,7 @@ void CDistributedFileSystem::replicate(IDistributedFile * from, IGroup *destgrou
 void CDistributedFileSystem::replicate(IFileDescriptor * fd, DaftReplicateMode mode, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
     StringBuffer s;
-    LOG(MCdebugInfo, unknownJob, "DFS: replicate(%s, %x)", fd->getTraceName(s).str(), (unsigned)mode);
+    DBGLOG("DFS: replicate(%s, %x)", fd->getTraceName(s).str(), (unsigned)mode);
 
     FileSprayer sprayer(options, recovery, recoveryConnection, wuid);
     sprayer.setOperation(dfu_replicate);
@@ -146,7 +146,7 @@ void CDistributedFileSystem::replicate(IFileDescriptor * fd, DaftReplicateMode m
 void CDistributedFileSystem::transfer(IFileDescriptor * from, IFileDescriptor * to, IPropertyTree * recovery, IRemoteConnection * recoveryConnection, IDFPartFilter *filter, IPropertyTree * options, IDaftProgress * progress, IAbortRequestCallback * abort, const char *wuid)
 {
     StringBuffer s1, s2;
-    LOG(MCdebugInfo, unknownJob, "DFS: transfer(%s,%s)", from->getTraceName(s1).str(), to->getTraceName(s1).str());
+    DBGLOG("DFS: transfer(%s,%s)", from->getTraceName(s1).str(), to->getTraceName(s1).str());
 
     OwnedIFileSprayer sprayer = createFileSprayer(options, recovery, recoveryConnection, wuid);
     sprayer->setOperation(dfu_transfer);
@@ -280,7 +280,7 @@ offset_t CDistributedFileSystem::getSize(IDistributedFilePart * part, bool force
 void CDistributedFileSystem::replicate(IDistributedFilePart * part, INode *node)
 {
     StringBuffer partname;
-    LOG(MCdebugInfo, unknownJob, "DFS: replicate part(%s)", part->getPartName(partname).str());
+    DBGLOG("DFS: replicate part(%s)", part->getPartName(partname).str());
 
     FileSprayer sprayer(NULL, NULL, NULL, NULL);
     sprayer.setReplicate(true);
@@ -298,7 +298,7 @@ bool CDistributedFileSystem::compress(IDistributedFilePart * part)
         OwnedIFile file = getIFile(part, copy);
         if (!file->setCompression(true))
         {
-            LOG(MCerror, unknownJob, "Failed to compress file part %s", file->queryFilename());
+            OERRLOG("Failed to compress file part %s", file->queryFilename());
             ok = false;
         }
     }

+ 4 - 4
dali/ft/daftdir.cpp

@@ -280,16 +280,16 @@ bool DirectoryBuilder::walkDirectory(const char * path, IPropertyTree * director
         switch (glret)
         {
         case GLOB_NOSPACE:
-            PrintLog("glob error for %s : running out of memory space", search.str());
+            IERRLOG("glob error for %s : running out of memory space", search.str());
             break;
         case GLOB_ABORTED:
-            PrintLog("glob error for %s : read error", search.str());
+            IERRLOG("glob error for %s : read error", search.str());
             break;
         case GLOB_NOMATCH:
-            PrintLog("no match found for %s", search.str());
+            IERRLOG("no match found for %s", search.str());
             break;
         default:
-            PrintLog("glob error for %s : %s", strerror(errno));
+            IERRLOG("glob error for %s : %s", search.str(), strerror(errno));
         }
     }
     else

+ 1 - 1
dali/ft/daftformat.cpp

@@ -80,7 +80,7 @@ void CPartitioner::commonCalcPartitions()
 {
     if (thisSize == 0)
     {
-        LOG(MCwarning, unknownJob, "Unexpected: Part %s has zero length!", fullPath.get());
+        OWARNLOG("Unexpected: Part %s has zero length!", fullPath.get());
         return;
     }
 

+ 3 - 3
dali/ft/filecopy.cpp

@@ -232,7 +232,7 @@ void FileTransferThread::logIfRunning(StringBuffer &list)
     {
         StringBuffer url;
         ep.getUrlStr(url);
-        LOG(MCwarning, unknownJob, "Still waiting for slave %s", url.str());
+        DBGLOG("Still waiting for slave %s", url.str());
         if (list.length())
             list.append(',');
         list.append(url);
@@ -485,7 +485,7 @@ bool FileSizeThread::wait(unsigned timems)
         }
         if (!rfn.isEmpty())
         {
-            WARNLOG("Waiting for file: %s",rfn.str());
+            OWARNLOG("Waiting for file: %s",rfn.str());
             return false;
         }
     }
@@ -1021,7 +1021,7 @@ public:
             catch (IException *e) {
                 StringBuffer path;
                 StringBuffer err;
-                WARNLOG("dafilesrv ExtractBlobElements(%s) failed with: %s",
+                OWARNLOG("dafilesrv ExtractBlobElements(%s) failed with: %s",
                         sprayer.sources.item(i).filename.getPath(path).str(),
                         e->errorMessage(err).str());
                 PROGLOG("Trying direct access (this may be slow)");

+ 4 - 4
dali/fuse/dafuse.cpp

@@ -671,7 +671,7 @@ class CFuseDaliDFS: public CFuseBase
                     }
                     catch (IException *e) {
                         StringBuffer tmp;
-                        WARNLOG("fuse_open %s",e->errorMessage(tmp).str());
+                        IERRLOG("fuse_open %s",e->errorMessage(tmp).str());
                         partfile.clear();
                     }
                     copy++;
@@ -684,7 +684,7 @@ class CFuseDaliDFS: public CFuseBase
                             part.getFilename(rfn,1);
                             rfn.getRemotePath(tmp);
                         }
-                        ERRLOG("%s part %d not found at %s",path,pn+1,tmp.str());
+                        OERRLOG("%s part %d not found at %s",path,pn+1,tmp.str());
                         return -ENOENT;
                     }
                     part.getFilename(rfn,copy);
@@ -694,7 +694,7 @@ class CFuseDaliDFS: public CFuseBase
                 if (!srcio) {
                     StringBuffer tmp;
                     rfn.getRemotePath(tmp);
-                    ERRLOG("could not open '%s' for read",tmp.str());
+                    OERRLOG("could not open '%s' for read",tmp.str());
                     return -EACCES;
                 }
                 bool blocked;
@@ -1051,7 +1051,7 @@ int main(int argc, char *_argv[])
 
     StringBuffer daliServer;
     if (!prop->getProp("DALISERVER", daliServer)) {
-        ERRLOG("DALISERVER setting not found in dafuse.ini");
+        OERRLOG("DALISERVER setting not found in dafuse.ini");
         return 1;
     }
     int res;

+ 9 - 9
dali/sasha/packetstore.cpp

@@ -240,7 +240,7 @@ public:
     {
         CriticalBlock block(store.lockingsect);
         if (locked) {
-            LOG(MCerror, unknownJob, "Warning: transaction previously locked (lockRead)");
+            IERRLOG("Warning: transaction previously locked (lockRead)");
             dounlock();
         }
         int count = (int)transaction.ordinality();
@@ -273,7 +273,7 @@ public:
     {
         CriticalBlock block(store.lockingsect);
         if (locked) {
-            LOG(MCerror, unknownJob, "Warning: transaction previously locked (lockWrite)");
+            IERRLOG("Warning: transaction previously locked (lockWrite)");
             dounlock();
         }
         int count = (int)transaction.ordinality();
@@ -416,7 +416,7 @@ public:
         CriticalBlock block(sect);
         if (doremove(sender,transactionid)) {
             StringBuffer s;
-            LOG(MCerror, unknownJob, "Warning: duplicate transaction detected from %s", sender.getUrlStr(s).str());
+            IERRLOG("Warning: duplicate transaction detected from %s", sender.getUrlStr(s).str());
             exit(0);
         }
         p->setTransactionId(sender,transactionid);
@@ -524,7 +524,7 @@ public:
                         mb.clear();
                         if (!transaction->lockRead(timeout)) {
                             // locally lock packet items
-                            LOG(MCerror, unknownJob, "CPacketStoreServer: lockRead Timeout");
+                            IERRLOG("CPacketStoreServer: lockRead Timeout");
                             ret = PSRET_LOCK_TIMEOUT;
                             mb.append(ret);
                         }
@@ -555,7 +555,7 @@ public:
                             if (numservers>1) { // start chain;
                                 mb.reset();
                                 if (!comm->send(mb,(myrank+1)%numservers,MPTAG_PACKET_STORE_REQUEST,SECONDARY_SEND_TIMEOUT)) {
-                                    LOG(MCerror, unknownJob, "CPacketStoreServer: Timeout sending secondary put header (1)");
+                                    IERRLOG("CPacketStoreServer: Timeout sending secondary put header (1)");
                                     *retp = PSRET_SEND_FAIL;
                                     // error recovery TBD
                                 }
@@ -565,14 +565,14 @@ public:
                         }
                         if (*retp==PSRET_OK) {
                             if (!transaction->lockWrite(timeout)) {
-                                LOG(MCerror, unknownJob, "CPacketStoreServer: lockWrite Timeout"); // better tracing TBD
+                                IERRLOG("CPacketStoreServer: lockWrite Timeout"); // better tracing TBD
                                 *retp = PSRET_LOCK_TIMEOUT;
                             }
                         }
                         if (*term!=myrank) {            
                             mb.reset();
                             if (!comm->send(mb,(myrank+1)%numservers,MPTAG_PACKET_STORE_REQUEST,SECONDARY_SEND_TIMEOUT)) {
-                                LOG(MCerror, unknownJob, "CPacketStoreServer: Timeout sending secondary put header");
+                                IERRLOG("CPacketStoreServer: Timeout sending secondary put header");
                                 *retp = PSRET_SEND_FAIL;
                                 // error recovery TBD
                             }
@@ -594,7 +594,7 @@ public:
                         CDataPacketTransaction *p=putinprogress.dequeue(sender,transactionid,PUT_DEQUEUE_TIMEOUT);
                         if (!p) {
                             ret = PSRET_LOCK_TIMEOUT;
-                            LOG(MCerror, unknownJob, "CPacketStoreServer: Timeout dequeuing transaction");
+                            IERRLOG("CPacketStoreServer: Timeout dequeuing transaction");
                             // error handling TBD
                             mb.clear().append(ret);
                             break;
@@ -623,7 +623,7 @@ public:
                         if (*term!=next) { // chain
                             mb.reset();
                             if (!comm->send(mb,next,MPTAG_PACKET_STORE_REQUEST,SECONDARY_SEND_TIMEOUT)) {
-                                LOG(MCerror, unknownJob, "CPacketStoreServer: Timeout sending secondary put header");
+                                IERRLOG("CPacketStoreServer: Timeout sending secondary put header");
                                 // error recovery TBD
                             }
                         }                           

+ 6 - 6
dali/sasha/saarch.cpp

@@ -868,7 +868,7 @@ static bool doArchiveWorkUnit(IWorkUnitFactory *wufactory,const char *wuid, Stri
                     catch (IException *e) { // maybe duplicate already?
                         StringBuffer msg;
                         e->errorMessage(msg);
-                        WARNLOG("ARCHIVE %s renaming %s to %s",msg.str(),path.str(),renpath.str());
+                        OWARNLOG("ARCHIVE %s renaming %s to %s",msg.str(),path.str(),renpath.str());
                         e->Release();
                     }
                 }
@@ -1114,12 +1114,12 @@ public:
         catch (IException *e) {
             StringBuffer err;
             e->errorMessage(err);
-            WARNLOG("setting archiveError: %s",err.str());
+            IERRLOG("setting archiveError: %s",err.str());
             e->Release();
         }
 #endif
         if (s.length())
-            WARNLOG("%s",s.str());
+            OWARNLOG("%s",s.str());
         return false;
     }
 
@@ -1184,7 +1184,7 @@ protected:
 
         bool backup()
         {
-            ERRLOG("cDFUWUBranchItem backup not supported");
+            IERRLOG("cDFUWUBranchItem backup not supported");
             return true;
         }
 
@@ -1214,7 +1214,7 @@ public:
             return true;
         }
         if (s.length())
-            WARNLOG("%s",s.str());
+            OWARNLOG("%s",s.str());
         return false;
     }
 
@@ -1275,7 +1275,7 @@ class CDFUrecoveryArchiver: public CBranchArchiver
 
         bool backup()
         {
-            ERRLOG("cDRBranchItem backup not supported");
+            IERRLOG("cDRBranchItem backup not supported");
             return true;
         }
 

+ 5 - 5
dali/sasha/sacoalescer.cpp

@@ -41,7 +41,7 @@ void coalesceDatastore(bool force)
         unsigned keepStores = confProps.getPropInt("@keepStores");
         if (0 == dataPath.length())
         {
-            ERRLOG("COALESCER: No dali data path found.");
+            OERRLOG("COALESCER: No dali data path found.");
             return;
         }
         
@@ -102,7 +102,7 @@ void coalesceDatastore(bool force)
                     _root.setown(createPTree("SDS"));
                 }
                 else {
-                    ERRLOG("Base store %d not found, exiting",baseEdition);
+                    OERRLOG("Base store %d not found, exiting",baseEdition);
                     break; // don't think much point continuing is there?
                 }
             }
@@ -236,7 +236,7 @@ public:
             unsigned interval = coalesceProps->getPropInt("@interval",DEFAULT_INTERVAL);
             if (!interval)
             {
-                ERRLOG("COALESCER: disabled");
+                OERRLOG("COALESCER: disabled");
                 return 0;
             }
             PROGLOG("COALESCER: min interval = %d hr", interval);
@@ -256,9 +256,9 @@ public:
                     if (GetCurrentDirectory(1024, cwd))
                         PROGLOG("COALESCE: Running '%s' in '%s'",cmd.str(),cwd);
                     else
-                        ERRLOG("COALESCE: Running '%s' in unknown current directory",cmd.str());
+                        OERRLOG("COALESCE: Running '%s' in unknown current directory",cmd.str());
                     if (!invoke_program(cmd.str(), runcode, false, NULL, &h)) 
-                        ERRLOG("Could not run saserver in coalesce mode");
+                        OERRLOG("Could not run saserver in coalesce mode");
                     else {
                         PROGLOG("COALESCE: started pid = %d",(int)h);
                         while (!wait_program(h,runcode,false)) {

+ 1 - 1
dali/sasha/salds.cpp

@@ -31,7 +31,7 @@ class CLargeDataStore: public CInterface, implements ILargeDataStore
             if (!isAbsolutePath(ldsrootdir)) {
                 char cpath[_MAX_DIR];
                 if (!GetCurrentDirectory(_MAX_DIR, cpath)){
-                    ERRLOG("CLargeDataStore::initBase: Current directory path too big, bailing out");
+                    OERRLOG("CLargeDataStore::initBase: Current directory path too big, bailing out");
                     throwUnexpected();
                 }
                 basedir.append(cpath);

+ 3 - 3
dali/sasha/saqmon.cpp

@@ -58,7 +58,7 @@ public:
             stopsem.signal();
         }
         if (!join(1000*60*3))
-            ERRLOG("CSashaQMonitorServer aborted");
+            IERRLOG("CSashaQMonitorServer aborted");
     }
 
 
@@ -147,7 +147,7 @@ public:
                 if (q)
                     q->enqueue((IJobQueueItem *)qitem);
                 else
-                    ERRLOG("cQswitcher cannot match queue %s",qname); // I don't think this can ever really happen
+                    IERRLOG("cQswitcher cannot match queue %s",qname); // I don't think this can ever really happen
             }
             bool isAuto()
             {
@@ -213,7 +213,7 @@ public:
             return 0;
         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 -1;
         }
         unsigned *qidlecount = new unsigned[qnames.ordinality()];

+ 2 - 2
dali/sasha/saserver.cpp

@@ -177,7 +177,7 @@ public:
         else if (cmd->getAction()==SCA_XREF) 
             processXRefRequest(cmd);
         else if (!processArchiverCommand(cmd)) 
-            WARNLOG("Command %d not handled",cmd->getAction());
+            OWARNLOG("Command %d not handled",cmd->getAction());
         if (cmd->getAction()==SCA_WORKUNIT_SERVICES_GET)
             cmd->WUSreply();
         else
@@ -406,7 +406,7 @@ int main(int argc, const char* argv[])
         e->Release();
     }
     catch (const char *s) {
-        WARNLOG("Sasha: %s",s);
+        OWARNLOG("Sasha: %s",s);
     }
 
     if (!stop)

+ 10 - 10
dali/sasha/sasha.cpp

@@ -25,7 +25,7 @@ bool restoreWU(const char * sashaserver,const char *wuid)
     SocketEndpoint ep(sashaserver);
     Owned<INode> node = createINode(ep);
     if (!cmd->send(node,1*60*1000)) {
-        ERRLOG("Could not connect to Sasha server at %s",sashaserver);
+        OERRLOG("Could not connect to Sasha server at %s",sashaserver);
         return false;
     }
     if (cmd->numIds()==0) {
@@ -50,7 +50,7 @@ bool listWUs(const char * sashaserver,const char *wuid)
     SocketEndpoint ep(sashaserver);
     Owned<INode> node = createINode(ep);
     if (!cmd->send(node,1*60*1000)) {
-        ERRLOG("Could not connect to Sasha server at %s",sashaserver);
+        OERRLOG("Could not connect to Sasha server at %s",sashaserver);
         return false;
     }
     unsigned n = cmd->numIds();
@@ -239,7 +239,7 @@ ISashaCommand *createCommand(unsigned argc, char* argv[], SocketEndpoint &server
                 if (isdigit(arg[0])) 
                     ep.set(arg,DEFAULT_SASHA_PORT);             
                 if (ep.isNull()) {
-                    ERRLOG("parameter '%s' not recognized",arg);
+                    OERRLOG("parameter '%s' not recognized",arg);
                     return NULL;
                 }
                 serverep = ep;
@@ -284,7 +284,7 @@ ISashaCommand *createCommand(unsigned argc, char* argv[], SocketEndpoint &server
                 return cmd.getClear();
             }
             else {
-                ERRLOG("action '%s' not recognized",tail);
+                OERRLOG("action '%s' not recognized",tail);
                 return NULL;
             }
         }
@@ -298,7 +298,7 @@ ISashaCommand *createCommand(unsigned argc, char* argv[], SocketEndpoint &server
         else if (stricmp(head.str(),"server")==0) {
             SocketEndpoint ep(tail,DEFAULT_SASHA_PORT);             
             if (ep.isNull()) {
-                ERRLOG("server '%s' not resolved",tail);
+                OERRLOG("server '%s' not resolved",tail);
                 return NULL;
             }
             serverep = ep;
@@ -352,7 +352,7 @@ ISashaCommand *createCommand(unsigned argc, char* argv[], SocketEndpoint &server
             else if (stricmp(head.str(),"output")==0)
                 cmd->setOutputFormat(tail);
             else {
-                ERRLOG("attribute '%s' not recognized",head.str());
+                OERRLOG("attribute '%s' not recognized",head.str());
                 return NULL;
             }
         }
@@ -364,11 +364,11 @@ ISashaCommand *createCommand(unsigned argc, char* argv[], SocketEndpoint &server
     if (iswild&&needloadwu&&!confirm("This command may take some time - ok to continue? (Y/N)"))
         return NULL;
     if (serverep.isNull()) {
-        ERRLOG("no server specified");
+        OERRLOG("no server specified");
         return NULL;
     }
     if (cmd->getAction()==SCA_null) {
-        ERRLOG("no action specified");
+        OERRLOG("no action specified");
         return NULL;
     }
     return cmd.getClear();
@@ -381,7 +381,7 @@ bool getVersion(INode *node)
     StringBuffer ips;
     node->endpoint().getIpText(ips);
     if (!cmd->send(node,1*60*1000)) {
-        ERRLOG("Could not connect to Sasha server on %s",ips.str());
+        OERRLOG("Could not connect to Sasha server on %s",ips.str());
         return false;
     }
     StringBuffer id;
@@ -389,7 +389,7 @@ bool getVersion(INode *node)
         PROGLOG("Sasha server[%s]: Version %s",ips.str(),id.str());
         return true;
     }
-    ERRLOG("Sasha server[%s]: Protocol error",ips.str());
+    IERRLOG("Sasha server[%s]: Protocol error",ips.str());
     return false;
 }
 

+ 5 - 5
dali/sasha/saverify.cpp

@@ -89,7 +89,7 @@ static void appendNodeEndpoint(IPropertyTree& node,SocketEndpointArray &eps)
     const char *computer = node.queryProp("@computer");
     CMachineEntryPtr *m = machinemap.getValue(computer);
     if (!m) {
-        ERRLOG("Computer name %s not found",computer);
+        OERRLOG("Computer name %s not found",computer);
         return;
     }
     SocketEndpoint ep = (*m)->ep;
@@ -394,7 +394,7 @@ public:
             stopsem.signal();
         }
         if (!join(1000*60*3))
-            ERRLOG("CSashaVerifierServer aborted");
+            IERRLOG("CSashaVerifierServer aborted");
     }
 
 
@@ -491,7 +491,7 @@ public:
             stopsem.signal();
         }
         if (!join(1000*60*3))
-            ERRLOG("CSashaDaFSMonitorServer aborted");
+            IERRLOG("CSashaDaFSMonitorServer aborted");
     }
 
     void checkCluster(SocketEndpointArray &eps,const char *clustername)
@@ -562,7 +562,7 @@ public:
         loadMachineMap();
         Owned<IRemoteConnection> conn = querySDS().connect("/Environment/Software", myProcessSession(), RTM_LOCK_READ, SDS_CONNECT_TIMEOUT);
         if (!conn) {
-            ERRLOG("Could not connect to /Environment/Software");
+            OERRLOG("Could not connect to /Environment/Software");
             return;
         }
         StringArray list;
@@ -594,7 +594,7 @@ public:
                     eps.append(ep);
                 }
                 else 
-                    WARNLOG("DAFSMON: Cannot resolve %s in cluster list",s);
+                    OWARNLOG("DAFSMON: Cannot resolve %s in cluster list",s);
             }
         }
         if (eps.ordinality()) {

+ 14 - 14
dali/sasha/saxref.cpp

@@ -127,7 +127,7 @@ struct cFileDesc // no virtuals
     {
         size32_t sl = strlen(_name); 
         if (sl>255) {
-            WARNLOG(LOGPFX "File name %s longer than 255 chars, truncating",_name);
+            OWARNLOG(LOGPFX "File name %s longer than 255 chars, truncating",_name);
             sl = 255;
         }
         size32_t ml = (n*4+7)/8;
@@ -247,7 +247,7 @@ struct cDirDesc
     {
         size32_t sl = strlen(_name);
         if (sl>255) {
-            WARNLOG(LOGPFX "Directory name %s longer than 255 chars, truncating",_name);
+            OWARNLOG(LOGPFX "Directory name %s longer than 255 chars, truncating",_name);
             sl = 255;
         }
         name = (byte *)mem.alloc(sl+1);
@@ -356,7 +356,7 @@ struct cDirDesc
             cMisplacedRec *mp = file->misplaced;
             while (mp) {
                 if (mp->eq(drv,pf,node,numnodes)) {
-                    ERRLOG(LOGPFX "Duplicate file with mismatched tail (%d,%d) %s",pf,node,name);
+                    OERRLOG(LOGPFX "Duplicate file with mismatched tail (%d,%d) %s",pf,node,name);
                     return NULL;
                 }
                 mp = mp->next;
@@ -370,7 +370,7 @@ struct cDirDesc
             // NB: still perform setpresent() below, so that later 'orphan' and 'found' scanning can spot the part as orphaned or part of a found file.
         }
         if (file->setpresent(drv,pf)) {
-            ERRLOG(LOGPFX "Duplicate file with mismatched tail (%d) %s",pf,name);
+            OERRLOG(LOGPFX "Duplicate file with mismatched tail (%d) %s",pf,name);
             file = NULL;
         }
         return file;
@@ -513,7 +513,7 @@ public:
                 errors.append(*new cMessage("","error limit exceeded (1000), truncating"));
         }
 
-        ERRLOG("%s: %s",lname,line.str());
+        OERRLOG("%s: %s",lname,line.str());
     }
 
     void warn(const char *lname,const char * format, ...) __attribute__((format(printf, 3, 4)))
@@ -529,7 +529,7 @@ public:
             if (warnings.ordinality()==1000) 
                 warnings.append(*new cMessage("","warning limit (1000) exceeded, truncating"));
         }
-        WARNLOG("%s: %s",lname,line.str());
+        OWARNLOG("%s: %s",lname,line.str());
     }
 
 
@@ -747,14 +747,14 @@ public:
         GroupType groupType;
         grp.setown(queryNamedGroupStore().lookup(grpstr.str(), basedir, groupType));
         if (!grp) {
-            ERRLOG(LOGPFX "Cluster %s node group %s not found",clustname.get(),grpstr.str());
+            OERRLOG(LOGPFX "Cluster %s node group %s not found",clustname.get(),grpstr.str());
             return false;
         }
         ForEachItemIn(i1,done) {
             GroupRelation gr = done.item(i1).compare(grp);
             if ((gr==GRidentical)||(gr==GRsubset)) {
                 if (strcmp(basedir.str(),donedir.item(i1))==0) {
-                    WARNLOG(LOGPFX "Node group %s already done",grpstr.str());
+                    OWARNLOG(LOGPFX "Node group %s already done",grpstr.str());
                     return false;
                 }
             }
@@ -773,7 +773,7 @@ public:
         ForEachNodeInGroup(i,*grp) {
             const SocketEndpoint &ep = grp->queryNode(i).endpoint();
             if (ep.port!=0) 
-                WARNLOG(LOGPFX "Group has ports!");
+                OWARNLOG(LOGPFX "Group has ports!");
             // check port 0 TBD
             if (NotFound == checkIpHash(ep)) {
                 addIpHash(ep,i);
@@ -1014,7 +1014,7 @@ public:
                     ForEachItemIn(j,parent.clusters) {
                         if (strcmp(parent.clusters.item(j),groups.item(i))==0) {
 //                          if (j!=0)
-//                              WARNLOG("DANXREF(scanFiles):  %s has alt group %s",filename,parent.clusters.item(i));
+//                              OWARNLOG("DANXREF(scanFiles):  %s has alt group %s",filename,parent.clusters.item(i));
                             return true;
                         }
                     }
@@ -1708,7 +1708,7 @@ public:
                 errors.append(*new cMessage("","error limit exceeded (1000), truncating"));
         }
 
-        ERRLOG("%s: %s",lname,line.str());
+        OERRLOG("%s: %s",lname,line.str());
     }
 
     void checkSuperFileLinkage()
@@ -2043,7 +2043,7 @@ public:
         }
         synchronized block(runmutex);   // hopefully stopped should stop
         if (!join(1000*60*3))
-            ERRLOG("CSashaXRefServer aborted");
+            OERRLOG("CSashaXRefServer aborted");
     }
 
     void runXRef(const char *clustcsl,bool updateeclwatch,bool byscheduler)
@@ -2083,7 +2083,7 @@ public:
         }
         Owned<IRemoteConnection> conn = querySDS().connect("/Environment/Software", myProcessSession(), RTM_LOCK_READ, SDS_CONNECT_TIMEOUT);
         if (!conn) {
-            ERRLOG("Could not connect to /Environment/Software");
+            OERRLOG("Could not connect to /Environment/Software");
             return;
         }
         StringArray groups;
@@ -2288,7 +2288,7 @@ public:
         }
         synchronized block(runmutex);   // hopefully stopped should stop
         if (!join(1000*60*3))
-            ERRLOG("CSashaExpiryServer aborted");
+            OERRLOG("CSashaExpiryServer aborted");
     }
 
     void runExpiry()

+ 9 - 9
dali/server/daldap.cpp

@@ -98,7 +98,7 @@ public:
                 /* Do not give an error if blank ldap server provided (for backward compat of old configuration
 
                 const char* pszErrMsg = "Invalid LDAP server address!";
-                ERRLOG(pszErrMsg);
+                OERRLOG(pszErrMsg);
                 throw MakeStringException(-1, pszErrMsg);
                 */
             }
@@ -139,14 +139,14 @@ public:
         }
         else
         {
-            WARNLOG("NULL UserDescriptor in daldap.cpp getPermissions('%s')",key ? key : "NULL");
+            DBGLOG("NULL UserDescriptor in daldap.cpp getPermissions('%s')",key ? key : "NULL");
         }
 
         if (0 == username.length())
         {
             username.append(filesdefaultuser);
             decrypt(password, filesdefaultpassword);
-            WARNLOG("Missing credentials, injecting deprecated filesdefaultuser");
+            OWARNLOG("Missing credentials, injecting deprecated filesdefaultuser");
             reqSignature = nullptr;
         }
 
@@ -174,7 +174,7 @@ public:
                 {
                     StringBuffer localDaliTimeUTC;
                     now.getString(localDaliTimeUTC, false);//get UTC timestamp
-                    ERRLOG("getPermissions(%s) scope=%s user=%s Request digital signature UTC timestamp %s from the future (Dali UTC time %s). Check configured allowedClockVariance (%d sec)",key?key:"NULL",obj?obj:"NULL",username.str(), requestTimestamp.str(), localDaliTimeUTC.str(), requestSignatureAllowedClockVarianceSeconds);
+                    OERRLOG("LDAP: getPermissions(%s) scope=%s user=%s Request digital signature UTC timestamp %s from the future (Dali UTC time %s)",key?key:"NULL",obj?obj:"NULL",username.str(), requestTimestamp.str(), localDaliTimeUTC.str());
                     return SecAccess_None;//deny
                 }
 
@@ -187,7 +187,7 @@ public:
                 {
                     StringBuffer localDaliTimeUTC;
                     now.getString(localDaliTimeUTC, false);//get UTC timestamp
-                    ERRLOG("getPermissions(%s) scope=%s user=%s Expired request digital signature UTC timestamp %s (Dali UTC time %s, configured expiry %d minutes. Check configured allowedClockVariance (%d sec))",key?key:"NULL",obj?obj:"NULL",username.str(), requestTimestamp.str(), localDaliTimeUTC.str(), requestSignatureExpiryMinutes, requestSignatureAllowedClockVarianceSeconds);
+                    OERRLOG("LDAP: getPermissions(%s) scope=%s user=%s Expired request digital signature UTC timestamp %s (Dali UTC time %s, configured expiry %d minutes)",key?key:"NULL",obj?obj:"NULL",username.str(), requestTimestamp.str(), localDaliTimeUTC.str(), requestSignatureExpiryMinutes);
                     return SecAccess_None;//deny
                 }
 
@@ -196,7 +196,7 @@ public:
 
                 if (!pDSM->digiVerify(b64Signature, expectedStr))//does the digital signature match what we expect?
                 {
-                    ERRLOG("LDAP: getPermissions(%s) scope=%s user=%s fails digital signature verification",key?key:"NULL",obj?obj:"NULL",username.str());
+                    OERRLOG("LDAP: getPermissions(%s) scope=%s user=%s fails digital signature verification",key?key:"NULL",obj?obj:"NULL",username.str());
                     return SecAccess_None;//deny
                 }
 
@@ -205,7 +205,7 @@ public:
                 user->setAuthenticateStatus(AS_AUTHENTICATED);
             }
             else
-                ERRLOG("LDAP: getPermissions(%s) scope=%s user=%s Dali received signed request, however Dali is not configured to verify digital signatures",key?key:"NULL",obj?obj:"NULL",username.str());
+                OERRLOG("LDAP: getPermissions(%s) scope=%s user=%s Dali received signed request, however Dali is not configured to verify digital signatures",key?key:"NULL",obj?obj:"NULL",username.str());
         }
 
         if (!isEmptyString(user->credentials().getPassword()) && !isWorkunitDAToken(user->credentials().getPassword()))
@@ -215,7 +215,7 @@ public:
                 const char * extra = "";
                 if (isEmptyString(reqSignature))
                     extra = " (Password or Dali Signature not provided)";
-                ERRLOG("LDAP: getPermissions(%s) scope=%s user=%s fails LDAP authentication%s",key?key:"NULL",obj?obj:"NULL",username.str(), extra);
+                OERRLOG("LDAP: getPermissions(%s) scope=%s user=%s fails LDAP authentication%s",key?key:"NULL",obj?obj:"NULL",username.str(), extra);
                 return SecAccess_None;//deny
             }
         }
@@ -292,7 +292,7 @@ public:
                 StringBuffer b64Signature(udesc->querySignature());
                 if (!pDSM->digiVerify(b64Signature, username))//digital signature valid?
                 {
-                    ERRLOG("LDAP: enableScopeScans(%s) : Invalid user digital signature", username.str());
+                    OERRLOG("LDAP: enableScopeScans(%s) : Invalid user digital signature", username.str());
                     *err = -1;
                     return false;
                 }

+ 5 - 5
dali/server/daserver.cpp

@@ -185,7 +185,7 @@ int main(int argc, char* argv[])
             fileMsgHandler = lf->beginLogging();
         }
 
-        DBGLOG("Build %s", BUILD_TAG);
+        PROGLOG("Build %s", BUILD_TAG);
 
         if (serverConfig)
         {
@@ -198,7 +198,7 @@ int main(int argc, char* argv[])
                 RemoteFilename rfn;
                 rfn.setRemotePath(dataPath);
                 if (!rfn.isLocal()) {
-                    ERRLOG("if a dataPath is specified, it must be on local machine");
+                    OERRLOG("if a dataPath is specified, it must be on local machine");
                     return 0;
                 }
                 addPathSepChar(dataPath);
@@ -229,7 +229,7 @@ int main(int argc, char* argv[])
                                 rfn.setPath(ep,mirrorPath.str());
                             }
                             else {
-                                WARNLOG("Local path used for backup url: %s", mirrorPath.str());
+                                OWARNLOG("Local path used for backup url: %s", mirrorPath.str());
                                 rfn.setLocalPath(mirrorPath.str());
                             }
                             rfn.getRemotePath(backupURL);
@@ -342,7 +342,7 @@ int main(int argc, char* argv[])
             PROGLOG("Checking for existing daserver instances");
             if (!globalNamedMutex.lockWait(0))
             {
-                PrintLog("Another DASERVER process is currently running");
+                OWARNLOG("Another DASERVER process is currently running");
                 return 0;
             }
         }
@@ -432,7 +432,7 @@ int main(int argc, char* argv[])
             stopPerformanceMonitor();
             throw;
         }
-        PrintLog("DASERVER[%d] starting - listening to port %d",myrank,queryMyNode()->endpoint().port);
+        PROGLOG("DASERVER[%d] starting - listening to port %d",myrank,queryMyNode()->endpoint().port);
         startMPServer(myport,false);
         bool ok = true;
         ForEachItemIn(i2,servers)

+ 2 - 2
fs/dafilesrv/dafilesrv.cpp

@@ -78,7 +78,7 @@ void LogError( const char *s,DWORD dwError )
     FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError,
             MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
             (LPTSTR) &lpBuffer, 0, NULL );   
-    ERRLOG( "%s(%d): %s", s, dwError, lpBuffer );   
+    OERRLOG( "%s(%d): %s", s, dwError, lpBuffer );   
     LocalFree( lpBuffer );
 }
 
@@ -280,7 +280,7 @@ bool uninstallService(const char *servicename,const char *servicedisplayname)
                 if ( ss.dwCurrentState == SERVICE_STOPPED ) 
                     PROGLOG("%s Service stopped",servicedisplayname); 
                 else 
-                    ERRLOG("%s failed to stop",servicedisplayname); 
+                    OERRLOG("%s failed to stop",servicedisplayname); 
             } 
             CloseServiceHandle(hService); 
         }

+ 11 - 11
fs/dafscontrol/dafscontrol.cpp

@@ -110,7 +110,7 @@ unsigned applyNodes(const char *grpip, ApplyMode mode, unsigned ver, bool isdali
     if (!isdali||!getCluster(grpip,eps)) {
         SocketEndpoint ep(grpip);
         if (ep.isNull()) {
-            ERRLOG("%s is not a group name or ip",grpip);
+            UERRLOG("%s is not a group name or ip",grpip);
             return 0;
         }
         if (ep.port==0)
@@ -193,7 +193,7 @@ unsigned applyNodes(const char *grpip, ApplyMode mode, unsigned ver, bool isdali
                     {
                         unsigned err = stopRemoteServer(sock);
                         if (err!=0) {
-                            ERRLOG("Could not stop server on %s, %d returned",epstr.str(),err);
+                            UERRLOG("Could not stop server on %s, %d returned",epstr.str(),err);
                             if (mode!=AMstopver)
                                 return;     // even though failed to stop - still return code
                         }
@@ -226,9 +226,9 @@ unsigned applyNodes(const char *grpip, ApplyMode mode, unsigned ver, bool isdali
                 result.item(i).getUrlStr(epstr.clear());
                 StringAttrItem &attr = resultstr.item(i);
                 if (attr.text.length()==0) 
-                    ERRLOG("%s: %s not running DAFILESRV",grpip,epstr.str());
+                    UERRLOG("%s: %s not running DAFILESRV",grpip,epstr.str());
                 else 
-                    ERRLOG("%s: %s %s running DAFILESRV version %s",grpip,(mode==AMstopver)?"was":"is",epstr.str(),attr.text.get());
+                    UERRLOG("%s: %s %s running DAFILESRV version %s",grpip,(mode==AMstopver)?"was":"is",epstr.str(),attr.text.get());
             }
             unsigned numok = eps.ordinality()-result.ordinality();
             if (mode==AMcheckvermajor)
@@ -262,7 +262,7 @@ unsigned applyNodes(const char *grpip, ApplyMode mode, unsigned ver, bool isdali
             StringBuffer epstr;
             ForEachItemIn(i,result) {
                 result.item(i).getUrlStr(epstr.clear());
-                ERRLOG("%s: %s not running DAFILESRV",grpip,epstr.str());
+                UERRLOG("%s: %s not running DAFILESRV",grpip,epstr.str());
             }
             unsigned numok = eps.ordinality()-result.ordinality();
             PROGLOG("%s: %d node%s running DAFILESRV",grpip,numok,(numok!=1)?"s":"");
@@ -373,14 +373,14 @@ int main(int argc, char* argv[])
                         SocketEndpoint ep(argv[ai+1]);
                         int ret = setDafileSvrTraceFlags(ep,(byte)atoi(argv[ai+2]));
                         if (ret!=0)
-                            ERRLOG("setDafileSvrTraceFlags returned %d",ret);
+                            UERRLOG("setDafileSvrTraceFlags returned %d",ret);
                     }
                     else {
                         ForEachItemIn(ni,eps) {
                             SocketEndpoint ep = eps.item(ni);
                             int ret = setDafileSvrTraceFlags(ep,(byte)atoi(argv[ai+2]));
                             if (ret!=0)
-                                ERRLOG("setDafileSvrTraceFlags returned %d",ret);
+                                UERRLOG("setDafileSvrTraceFlags returned %d",ret);
                             StringBuffer s("done ");
                             ep.getUrlStr(s);
                             PROGLOG("%s",s.str());
@@ -406,7 +406,7 @@ int main(int argc, char* argv[])
                         VStringBuffer result("Info for %s", epStr.str());
                         int ret = getDafileSvrInfo(ep, level, result);
                         if (ret!=0)
-                            ERRLOG("getDafileSvrInfo for %s returned %d", epStr.str(), ret);
+                            UERRLOG("getDafileSvrInfo for %s returned %d", epStr.str(), ret);
                         else
                             PROGLOG("%s", result.str());
                     }
@@ -418,7 +418,7 @@ int main(int argc, char* argv[])
                             VStringBuffer result("Info for %s: ", epStr.str());
                             int ret = getDafileSvrInfo(ep, level, result);
                             if (ret!=0)
-                                ERRLOG("getDafileSvrInfo for %s returned %d", epStr.str(), ret);
+                                UERRLOG("getDafileSvrInfo for %s returned %d", epStr.str(), ret);
                             else
                                 PROGLOG("%s", result.str());
                         }
@@ -436,14 +436,14 @@ int main(int argc, char* argv[])
                         SocketEndpoint ep(argv[ai+1]);
                         int ret = setDafileSvrThrottleLimit(ep, (ThrottleClass)atoi(argv[ai+2]), atoi(argv[ai+3]), atoi(argv[ai+4]), atoi(argv[ai+5]), atoi(argv[ai+6]), &errMsg);
                         if (ret!=0)
-                            ERRLOG("setDafileSvrThrottleLimit returned %d, error = %s", ret, errMsg.str());
+                            UERRLOG("setDafileSvrThrottleLimit returned %d, error = %s", ret, errMsg.str());
                     }
                     else {
                         ForEachItemIn(ni,eps) {
                             SocketEndpoint ep = eps.item(ni);
                             int ret = setDafileSvrThrottleLimit(ep, (ThrottleClass)atoi(argv[ai+2]), atoi(argv[ai+3]), atoi(argv[ai+4]), atoi(argv[ai+5]), atoi(argv[ai+6]), &errMsg.clear());
                             if (ret!=0)
-                                ERRLOG("setDafileSvrThrottleLimit returned %d, error = %s", ret, errMsg.str());
+                                UERRLOG("setDafileSvrThrottleLimit returned %d, error = %s", ret, errMsg.str());
                             StringBuffer s("done ");
                             ep.getUrlStr(s);
                             PROGLOG("%s",s.str());

+ 18 - 0
system/jlib/jlog.hpp

@@ -988,6 +988,24 @@ inline void IWARNLOG(LogMsgCode code, char const * format, ...)
     va_end(args);
 }
 
+inline IException *IWARNLOG(IException *except, const char *prefix=nullptr)
+{
+    LOG(MCinternalWarning, except, prefix);
+    return except;
+}
+
+inline IException *UWARNLOG(IException *except, const char *prefix=nullptr)
+{
+    LOG(MCuserWarning, except, prefix);
+    return except;
+}
+
+inline IException *OWARNLOG(IException *except, const char *prefix=nullptr)
+{
+    LOG(MCoperatorWarning, except, prefix);
+    return except;
+}
+
 inline void OERRLOG(LogMsgCode code, char const * format, ...) __attribute__((format(printf, 2, 3)));
 inline void OERRLOG(LogMsgCode code, char const * format, ...)
 {