*/
-#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.
#include <string>
#include <boost/thread/mutex.hpp>
+#include <boost/filesystem.hpp>
/** @class Log
* @brief A very simple logging class.
*/
-class Log
+class Log : public boost::noncopyable
{
public:
Log ();
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 */
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