- force a file close to flush debug outputs when setting back logging from file to console

This commit is contained in:
kunitoki 2012-04-10 16:46:11 +02:00
parent 81c9dd7b6b
commit ee2674cda8

View file

@ -154,7 +154,14 @@ void logger::use_console()
saved_buf_ = std::clog.rdbuf();
}
// close the file to force a flush
if (file_output_.is_open())
{
file_output_.close();
}
std::clog.rdbuf(saved_buf_);
}
}
} // namespace mapnik