From c8223fa45f01bc38d36f368f12454cf6a3375b1b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 25 Nov 2013 00:45:34 +0000 Subject: Remove another fstream. --- src/lib/log.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/log.cc b/src/lib/log.cc index 86de21bdd..9ddf460d4 100644 --- a/src/lib/log.cc +++ b/src/lib/log.cc @@ -21,9 +21,10 @@ * @brief A very simple logging class. */ -#include #include +#include #include "log.h" +#include "cross.h" #include "i18n.h" @@ -102,7 +103,8 @@ FileLog::FileLog (boost::filesystem::path file) void FileLog::do_log (string m) { - ofstream f (_file.string().c_str(), fstream::app); - f << m << N_("\n"); + FILE* f = fopen_boost (_file, "a"); + fprintf (f, "%s\n", m.c_str ()); + fclose (f); } -- cgit v1.2.3