Skip to content

Commit e271570

Browse files
committed
DPL: do not load infologger by default unless running under control
1 parent 4bd05bf commit e271570

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Framework/Core/src/CommonServices.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,15 +825,21 @@ std::vector<ServiceSpec> CommonServices::defaultServices(int numThreads)
825825
decongestionSpec(),
826826
CommonMessageBackends::rawBufferBackendSpec()};
827827

828-
std::string loadableServicesStr = "O2FrameworkDataTakingSupport:InfoLoggerContext,O2FrameworkDataTakingSupport:InfoLogger";
828+
std::string loadableServicesStr;
829+
// Do not load InfoLogger by default if we are not at P2.
830+
if (getenv("DDS_SESSION_ID") != nullptr || getenv("OCC_CONTROL_PORT") != nullptr) {
831+
loadableServicesStr += "O2FrameworkDataTakingSupport:InfoLoggerContext,O2FrameworkDataTakingSupport:InfoLogger";
832+
}
829833
// Load plugins depending on the environment
830834
std::vector<LoadableService> loadableServices = {};
831835
char* loadableServicesEnv = getenv("DPL_LOAD_SERVICES");
832836
// String to define the services to load is:
833837
//
834838
// library1:name1,library2:name2,...
835839
if (loadableServicesEnv) {
836-
loadableServicesStr += ",";
840+
if (loadableServicesStr.empty() == false) {
841+
loadableServicesStr += ",";
842+
}
837843
loadableServicesStr += loadableServicesEnv;
838844
}
839845
loadableServices = ServiceHelpers::parseServiceSpecString(loadableServicesStr.c_str());

0 commit comments

Comments
 (0)