33 const std::string & application )
50 setenv(
"DUNEDAQ_SESSION",
session.c_str(), 1);
51 setenv(
"DUNEDAQ_APPLICATION_NAME", application.c_str(), 1);
54 setenv(
"DUNEDAQ_ERS_FATAL",
"erstrace,lstderr",0);
55 setenv(
"DUNEDAQ_ERS_ERROR",
"erstrace,throttle(30,100),lstderr",0);
56 setenv(
"DUNEDAQ_ERS_WARNING",
"erstrace,throttle(30,100),lstderr",0);
57 setenv(
"DUNEDAQ_ERS_INFO",
"erstrace,lstdout",0);
58 setenv(
"DUNEDAQ_ERS_LOG",
"lstdout",0);
59 setenv(
"DUNEDAQ_ERS_DEBUG",
"lstdout",0);
60 std::vector<std::string> envvars = {
"DUNEDAQ_ERS_FATAL",
"DUNEDAQ_ERS_ERROR",
"DUNEDAQ_ERS_WARNING",
"DUNEDAQ_ERS_INFO"};
61 for (std::string& envvar : envvars) {
62 char *ecp = getenv(envvar.c_str());
63 if (strncmp(ecp,
"erstrace",8) != 0) {
64 std::string newval =
"erstrace," + std::string(ecp);
65 setenv(envvar.c_str(),newval.c_str(),1);
80 ers::InternalMessage msg(lc,
"Logger setup(...) ers::debug level "+std::to_string(lvl)+
" -- seems to come out level 0 (with ERS version v0_26_00d) ???");
85 if ((cp=getenv(
"DUNEDAQ_ERS_DEBUG_LEVEL")) && *cp) {
86 int lvl=strtoul(cp,
nullptr,0)+TLVL_DEBUG;
89 uint64_t msk = ((1ULL<<lvl)-1) | (1ULL<<lvl);
90 std::string mskstr=std::to_string(msk);
91 setenv(
"TRACE_LVLS",mskstr.c_str(),0);