diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-25 00:45:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-25 00:45:34 +0000 |
| commit | c8223fa45f01bc38d36f368f12454cf6a3375b1b (patch) | |
| tree | 7608c36f2eab8df7060008fd5a54a4848cef275e | |
| parent | 9f3b6e8e71a6158fd8d83e0e34d70531fc3d8634 (diff) | |
Remove another fstream.
| -rw-r--r-- | src/lib/log.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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 <fstream> #include <time.h> +#include <cstdio> #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); } |
