projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git]
/
src
/
lib
/
file_log.cc
diff --git
a/src/lib/file_log.cc
b/src/lib/file_log.cc
index b3c9797c9e8949a926a034732d25c55fa897f666..1557bbd944eeb1633fd2b30efb53199f5a5e07b2 100644
(file)
--- a/
src/lib/file_log.cc
+++ b/
src/lib/file_log.cc
@@
-25,6
+25,7
@@
using std::cout;
using std::string;
using std::max;
using std::cout;
using std::string;
using std::max;
+using boost::shared_ptr;
/** @param file Filename to write log to */
FileLog::FileLog (boost::filesystem::path file)
/** @param file Filename to write log to */
FileLog::FileLog (boost::filesystem::path file)
@@
-34,15
+35,15
@@
FileLog::FileLog (boost::filesystem::path file)
}
void
}
void
-FileLog::do_log (s
tring m
)
+FileLog::do_log (s
hared_ptr<const LogEntry> entry
)
{
FILE* f = fopen_boost (_file, "a");
if (!f) {
{
FILE* f = fopen_boost (_file, "a");
if (!f) {
- cout << "(could not log to " << _file.string() << "): " <<
m
<< "\n";
+ cout << "(could not log to " << _file.string() << "): " <<
entry.get()
<< "\n";
return;
}
return;
}
- fprintf (f, "%s\n",
m
.c_str ());
+ fprintf (f, "%s\n",
entry->get()
.c_str ());
fclose (f);
}
fclose (f);
}