1 #ifndef OTSDAQ_CORE_MESSAGEFACILITY_MESSAGEFACILITY_H
2 #define OTSDAQ_CORE_MESSAGEFACILITY_MESSAGEFACILITY_H
4 #include <messagefacility/MessageLogger/MessageLogger.h>
5 #include "artdaq-core/Utilities/configureMessageFacility.hh"
6 #include "otsdaq-core/Macros/CoutMacros.h"
12 inline void INIT_MF(
const char* name)
14 char* logRootString = getenv(
"OTSDAQ_LOG_ROOT");
15 if (logRootString ==
nullptr)
18 __COUT_ERR__ <<
"\n**********************************************************" << std::endl;
19 __COUT_ERR__ <<
"WARNING: OTSDAQ_LOG_ROOT environment variable was not set!" << std::endl;
20 __COUT_ERR__ <<
"**********************************************************\n" << std::endl;;
24 setenv(
"ARTDAQ_LOG_ROOT", logRootString, 1);
26 char* logFhiclCode = getenv(
"OTSDAQ_LOG_FHICL");
27 if (logFhiclCode ==
nullptr)
29 __COUT_ERR__ <<
"\n***********************************************************" << std::endl;
30 __COUT_ERR__ <<
"WARNING: OTSDAQ_LOG_FHICL environment variable was not set!" << std::endl;
31 __COUT_ERR__ <<
"***********************************************************\n" << std::endl;
35 setenv(
"ARTDAQ_LOG_FHICL", logFhiclCode, 1);
37 artdaq::configureMessageFacility(
42 artdaq::setMsgFacAppName(name,0);