X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Ffile_log.cc;h=b9aa84c3d9ff2aa957f84f01714fb1cbc1def2f9;hp=f6eaa58f8ebaf85b4e02630fee9ab869f91115c2;hb=a1f7bf2d9e5610075fbd898cdf52f4f8373741f2;hpb=adddda49c17e87198253d9c900dcef0f5fb2e175 diff --git a/src/lib/file_log.cc b/src/lib/file_log.cc index f6eaa58f8..b9aa84c3d 100644 --- a/src/lib/file_log.cc +++ b/src/lib/file_log.cc @@ -23,6 +23,7 @@ #include "config.h" #include #include +#include using std::cout; using std::string; @@ -36,12 +37,18 @@ FileLog::FileLog (boost::filesystem::path file) set_types (Config::instance()->log_types()); } +FileLog::FileLog (boost::filesystem::path file, int types) + : _file (file) +{ + set_types (types); +} + void FileLog::do_log (shared_ptr entry) { FILE* f = fopen_boost (_file, "a"); if (!f) { - cout << "(could not log to " << _file.string() << "): " << entry.get() << "\n"; + cout << "(could not log to " << _file.string() << " error " << errno << "): " << entry->get() << "\n"; return; }