X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Flog.h;h=991532404293a7a01fc59762b3b1b8b0d15af6ec;hb=6bc33bf8bbf13ab9aee0d3e455f62d98f9e527f4;hp=298b425cd85e66aa23c11524e89626761592d5e6;hpb=bfa0eb6afdd82934a19b1d31407d2956235292c3;p=dcpomatic.git diff --git a/src/lib/log.h b/src/lib/log.h index 298b425cd..991532404 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -17,8 +17,8 @@ */ -#ifndef DVDOMATIC_LOG_H -#define DVDOMATIC_LOG_H +#ifndef DCPOMATIC_LOG_H +#define DCPOMATIC_LOG_H /** @file src/log.h * @brief A very simple logging class. @@ -26,11 +26,12 @@ #include #include +#include /** @class Log * @brief A very simple logging class. */ -class Log +class Log : public boost::noncopyable { public: Log (); @@ -46,6 +47,7 @@ public: void microsecond_log (std::string m, Level l = STANDARD); void set_level (Level l); + void set_level (std::string l); protected: /** mutex to protect the log */ @@ -61,12 +63,20 @@ private: class FileLog : public Log { public: - FileLog (std::string file); + FileLog (boost::filesystem::path file); private: void do_log (std::string m); /** filename to write to */ - std::string _file; + boost::filesystem::path _file; +}; + +class NullLog : public Log +{ +public: + +private: + void do_log (std::string) {} }; #endif