diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-29 21:38:08 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-29 21:38:08 +0000 |
| commit | bdbb254c18b100f8fa66a3707f6b515309d05685 (patch) | |
| tree | 44606dda0a79df54f758c278c70df06733b28378 /src/lib/log.cc | |
| parent | 95f29bc89f860342c100d7609ce5e2e4a138aa8a (diff) | |
| parent | 747fc9e02cb66fb965e23a4cc0464cf7e8bd743d (diff) | |
Merge master.
Diffstat (limited to 'src/lib/log.cc')
| -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); } |
