projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do lots of the player processing with less copying.
[dcpomatic.git]
/
src
/
lib
/
log.cc
diff --git
a/src/lib/log.cc
b/src/lib/log.cc
index ef36a902cbbc76027982bc8a054630ca1e693d38..9ddf460d43ccc1c382270e607a7634a66be09049 100644
(file)
--- a/
src/lib/log.cc
+++ b/
src/lib/log.cc
@@
-21,9
+21,10
@@
* @brief A very simple logging class.
*/
* @brief A very simple logging class.
*/
-#include <fstream>
#include <time.h>
#include <time.h>
+#include <cstdio>
#include "log.h"
#include "log.h"
+#include "cross.h"
#include "i18n.h"
#include "i18n.h"
@@
-93,7
+94,7
@@
Log::set_level (string l)
}
/** @param file Filename to write log to */
}
/** @param file Filename to write log to */
-FileLog::FileLog (
string
file)
+FileLog::FileLog (
boost::filesystem::path
file)
: _file (file)
{
: _file (file)
{
@@
-102,7
+103,8
@@
FileLog::FileLog (string file)
void
FileLog::do_log (string m)
{
void
FileLog::do_log (string m)
{
- ofstream f (_file.c_str(), fstream::app);
- f << m << N_("\n");
+ FILE* f = fopen_boost (_file, "a");
+ fprintf (f, "%s\n", m.c_str ());
+ fclose (f);
}
}