@@ -39,33 +39,33 @@ PostProcessingRunner::~PostProcessingRunner()
3939
4040bool PostProcessingRunner::init ()
4141{
42- LOG ( INFO ) << " Initializing PostProcessingRunner" ;
42+ ILOG (Info ) << " Initializing PostProcessingRunner" << ENDM ;
4343
4444 try {
4545 // configuration of the database
4646 mDatabase = DatabaseFactory::create (mConfigFile ->get <std::string>(" qc.config.database.implementation" ));
4747 mDatabase ->connect (mConfigFile ->getRecursiveMap (" qc.config.database" ));
48- LOG ( INFO ) << " Database that is going to be used : " ;
49- LOG ( INFO ) << " >> Implementation : " << mConfigFile ->get <std::string>(" qc.config.database.implementation" );
50- LOG ( INFO ) << " >> Host : " << mConfigFile ->get <std::string>(" qc.config.database.host" );
48+ ILOG (Info ) << " Database that is going to be used : " << ENDM ;
49+ ILOG (Info ) << " >> Implementation : " << mConfigFile ->get <std::string>(" qc.config.database.implementation" ) << ENDM ;
50+ ILOG (Info ) << " >> Host : " << mConfigFile ->get <std::string>(" qc.config.database.host" ) << ENDM ;
5151 mServices .registerService <DatabaseInterface>(mDatabase .get ());
5252 } catch (
5353 std::string const & e) { // we have to catch here to print the exception because the device will make it disappear todo: is it still the case?
54- LOG ( ERROR ) << " exception : " << e;
54+ ILOG (Error ) << " exception : " << e << ENDM ;
5555 throw ;
5656 } catch (...) {
5757 std::string diagnostic = boost::current_exception_diagnostic_information ();
58- LOG ( ERROR ) << " Unexpected exception, diagnostic information follows:\n "
59- << diagnostic;
58+ ILOG (Error ) << " Unexpected exception, diagnostic information follows:\n "
59+ << diagnostic << ENDM ;
6060 throw ;
6161 }
6262
6363 // setup user's task
64- LOG ( INFO ) << " Creating a user task '" << mConfig .taskName << " '" ;
64+ ILOG (Info ) << " Creating a user task '" << mConfig .taskName << " '" << ENDM ;
6565 PostProcessingFactory f;
6666 mTask .reset (f.create (mConfig ));
6767 if (mTask ) {
68- LOG ( INFO ) << " The user task '" << mConfig .taskName << " ' successfully created" ;
68+ ILOG (Info ) << " The user task '" << mConfig .taskName << " ' successfully created" << ENDM ;
6969
7070 mState = TaskState::Created;
7171 mTask ->setName (mConfig .taskName );
@@ -74,19 +74,19 @@ bool PostProcessingRunner::init()
7474 mInitTriggers = trigger_helpers::createTriggers (mConfig .initTriggers );
7575 return true ;
7676 } else {
77- LOG ( INFO ) << " Failed to create the task '" << mConfig .taskName << " '" ;
77+ ILOG (Info ) << " Failed to create the task '" << mConfig .taskName << " '" << ENDM ;
7878 // todo :maybe exceptions instead of return values
7979 return false ;
8080 }
8181}
8282
8383bool PostProcessingRunner::run ()
8484{
85- LOG ( INFO ) << " Running PostProcessingRunner" ;
85+ ILOG (Info ) << " Running PostProcessingRunner" << ENDM ;
8686
8787 if (mState == TaskState::Created) {
8888 if (Trigger trigger = trigger_helpers::tryTrigger (mInitTriggers )) {
89- LOG ( INFO ) << " Initializing user task" ;
89+ ILOG (Info ) << " Initializing user task" << ENDM ;
9090
9191 mTask ->initialize (trigger, mServices );
9292
@@ -98,22 +98,22 @@ bool PostProcessingRunner::run()
9898 if (mState == TaskState::Running) {
9999
100100 if (Trigger trigger = trigger_helpers::tryTrigger (mUpdateTriggers )) {
101- LOG ( INFO ) << " Updating user task" ;
101+ ILOG (Info ) << " Updating user task" << ENDM ;
102102 mTask ->update (trigger, mServices );
103103 }
104104 if (Trigger trigger = trigger_helpers::tryTrigger (mStopTriggers )) {
105- LOG ( INFO ) << " Finalizing user task" ;
105+ ILOG (Info ) << " Finalizing user task" << ENDM ;
106106 mTask ->finalize (trigger, mServices );
107107 mState = TaskState::Finished; // maybe the task should monitor its state by itself?
108108 }
109109 }
110110 if (mState == TaskState::Finished) {
111- LOG ( INFO ) << " User task finished, returning..." ;
111+ ILOG (Info ) << " User task finished, returning..." << ENDM ;
112112 return false ;
113113 }
114114 if (mState == TaskState::INVALID ) {
115115 // todo maybe exception?
116- LOG ( INFO ) << " User task state INVALID, returning..." ;
116+ ILOG (Info ) << " User task state INVALID, returning..." << ENDM ;
117117 return false ;
118118 }
119119
0 commit comments