Skip to content
Snippets Groups Projects
Commit 3a7c7178 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

revised thanos to better redirect I/O from steps

Former-commit-id: 8e84822c32f3ba58464b9ea161700d23b78ba9b1
parent 57233840
No related branches found
No related tags found
No related merge requests found
......@@ -74,13 +74,18 @@ int main(int argc, char* argv[])
real_cerr=&my_real_cerr;
real_cout=&my_real_cout;
thanos_log.open("logs/thanos.log", ofstream::out);
thanos_log.open("logs/thanos.log", ofstream::out|ofstream::app);
if(!thanos_log)
{
cerr<<"Cannot open logs/thanos.log"<<endl;
exit(1);
}
// catch any misc stuff to the thanos log
cout.rdbuf(thanos_log.rdbuf());
cerr.rdbuf(thanos_log.rdbuf());
// get plugins
auto argv_iter=1;
while (true)
......@@ -302,7 +307,7 @@ int ThanosPlugin_t::executeStep(TransformStep_t& the_step, const bool are_debugg
*real_cout<<"Done. Command failed! ***************************************"<<endl;
if(!step_optional)
{
*real_cout<<"ERROR: The "<<the_step.getStepName()<<" step is necessary, but failed. Exiting early."<<endl;
*real_cout<<"ERROR: The "<<the_step.getStepName()<<" step is necessary, but options parsing failed. Exiting early."<<endl;
}
return parse_retval;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment