- force a file close to flush debug outputs when setting back logging from file to console
This commit is contained in:
parent
81c9dd7b6b
commit
ee2674cda8
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue