diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-09 13:44:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-09 13:45:12 +0100 |
| commit | aeb835a18c8df347e0ed68fb24631b320abeb611 (patch) | |
| tree | 01746a2d872aad8127a1442326ac720756172a17 /src/lib/log.h | |
| parent | 4d9f56686380aed5eb3e17ab9e720df57a17f079 (diff) | |
Logging improvements to allow prettier displays in the server GUI.
Diffstat (limited to 'src/lib/log.h')
| -rw-r--r-- | src/lib/log.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/log.h b/src/lib/log.h index 2acef6601..2c44f32ce 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -24,6 +24,7 @@ * @brief A very simple logging class. */ +#include "log_entry.h" #include <dcp/types.h> #include <boost/thread/mutex.hpp> #include <boost/filesystem.hpp> @@ -39,15 +40,8 @@ public: Log (); virtual ~Log () {} - static const int TYPE_GENERAL; - static const int TYPE_WARNING; - static const int TYPE_ERROR; - static const int TYPE_DEBUG_DECODE; - static const int TYPE_DEBUG_ENCODE; - static const int TYPE_TIMING; - + void log (boost::shared_ptr<const LogEntry> entry); void log (std::string message, int type); - void microsecond_log (std::string message, int type); void dcp_log (dcp::NoteType type, std::string message); void set_types (int types); @@ -63,7 +57,7 @@ protected: mutable boost::mutex _mutex; private: - virtual void do_log (std::string m) = 0; + virtual void do_log (boost::shared_ptr<const LogEntry> entry) = 0; void config_changed (); /** bit-field of log types which should be put into the log (others are ignored) */ |
