diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-26 22:23:15 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-26 22:23:15 +0000 |
| commit | 72eedf0b240c71b9dbd27d1f95b109b48e3200a2 (patch) | |
| tree | f01295128962cae9fa51e292b22afe066bb7c406 /src/lib/log.cc | |
| parent | ad0ddd25c94730bed174756a21c83a348c45687e (diff) | |
A whole load of UTF-8/-16 confusion fixes for Windows.
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); } |
