make_checkpoint writes stats on clog by default

Allow for separating logs from output of an algorithm.
This commit is contained in:
Johann Dreo 2020-03-11 11:39:38 +01:00
commit c8121c788d
2 changed files with 6 additions and 6 deletions

View file

@ -194,14 +194,14 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu
// The monitors // The monitors
/////////////// ///////////////
// do we want an eoStdoutMonitor? // do we want an eoOStreamMonitor?
bool needStdoutMonitor = printBestParam.value() bool needOutMonitor = printBestParam.value()
|| printPopParam.value() ; || printPopParam.value() ;
// The Stdout monitor will print parameters to the screen ... // The monitor will print parameters to the screen ...
if ( needStdoutMonitor ) if ( needOutMonitor )
{ {
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/); eoMonitor *monitor = new eoOStreamMonitor(std::clog);
_state.storeFunctor(monitor); _state.storeFunctor(monitor);
// when called by the checkpoint (i.e. at every generation) // when called by the checkpoint (i.e. at every generation)

View file

@ -19,7 +19,7 @@
eoMonitor& eoOStreamMonitor::operator()(void) eoMonitor& eoOStreamMonitor::operator()(void)
{ {
if (!out) { if (!out) {
std::string str = "eoOStreamMonitor: Could not write to the ooutput stream"; std::string str = "eoOStreamMonitor: Could not write to the output stream";
throw std::runtime_error(str); throw std::runtime_error(str);
} }