Permalink
Browse files

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

… from file to console
  • Loading branch information...
1 parent 81c9dd7 commit ee2674cda8fb348362ff202d17ce3bdcbac8b6e1 @kunitoki kunitoki committed Apr 10, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/debug.cpp
View
@@ -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

0 comments on commit ee2674c

Please sign in to comment.