diff --git a/dali/base/daclient.cpp b/dali/base/daclient.cpp index b8ef382995b..f8adc17e90a 100644 --- a/dali/base/daclient.cpp +++ b/dali/base/daclient.cpp @@ -260,6 +260,8 @@ void CSDSServerStatus::stop() void connectLogMsgManagerToDali() { + if (isContainerized()) + return; // we do not redirect logging between components in containerized environments (this is used for audit->dali in BM) IGroup & servers = queryCoven().queryGroup(); unsigned parentRank = getRandom() % servers.ordinality(); // PG: Not sure if logging to random parent is best? daliClientLoggingParent = &servers.queryNode(parentRank); diff --git a/dali/server/daserver.cpp b/dali/server/daserver.cpp index 3e4aac3c583..cdd2f21a1e9 100644 --- a/dali/server/daserver.cpp +++ b/dali/server/daserver.cpp @@ -81,7 +81,8 @@ void AddServers(const char *auditdir) servers.append(*createDaliSDSServer(serverConfig)); servers.append(*createDaliNamedQueueServer()); servers.append(*createDaliDFSServer(serverConfig)); - servers.append(*createDaliAuditServer(auditdir)); + if (!isContainerized()) // NB: audit logging is output locally by the container in containerized mode (and picked up by a logging backend) + servers.append(*createDaliAuditServer(auditdir)); servers.append(*createDaliDiagnosticsServer()); // add new coven servers here } @@ -699,10 +700,10 @@ int main(int argc, const char* argv[]) group->Release(); epa.kill(); -// Audit logging StringBuffer auditDir; + if (!isContainerized()) // NB: audit logging is output locally by the container in containerized mode (and picked up by a logging backend) { - //MORE: Does this need to change in CONTAINERIZED mode? + // Audit logging Owned lf = createComponentLogFileCreator(serverConfig, "dali"); lf->setLogDirSubdir("audit");//add to tail of config log dir lf->setName("DaAudit");//override default filename diff --git a/system/mp/mplog.cpp b/system/mp/mplog.cpp index 9d3a466d1ba..86b338e85c1 100644 --- a/system/mp/mplog.cpp +++ b/system/mp/mplog.cpp @@ -558,6 +558,8 @@ bool disconnectLogMsgManagerFromParentOwn(INode * parentNode) void startLogMsgParentReceiver() { + if (isContainerized()) + return; // we do not redirect logging between components in containerized environments (this is used for audit->dali in BM) parentReceiver = new LogMsgParentReceiverThread(); parentReceiver->start(false); }