diff options
author | scop <scop> | 2005-03-14 18:48:33 +0000 |
---|---|---|
committer | scop <scop> | 2005-03-14 18:48:33 +0000 |
commit | 4c76e2049bfad88b39baecd31c4d7cb68c214994 (patch) | |
tree | 7fb564b00f15cb6d6313a744957c25b0354d46e7 /dxr3log.h | |
parent | 63d7af332f1394b8db53bdd9ddf09fc7cc9c59cb (diff) | |
download | vdr-plugin-dxr3-4c76e2049bfad88b39baecd31c4d7cb68c214994.tar.gz vdr-plugin-dxr3-4c76e2049bfad88b39baecd31c4d7cb68c214994.tar.bz2 |
Sync configurable log dir from HEAD.
Diffstat (limited to 'dxr3log.h')
-rw-r--r-- | dxr3log.h | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -25,7 +25,6 @@ #include <fstream> #include <string> #include "dxr3singleton.h" -#include "dxr3vdrincludes.h" // ================================== //! A log class. @@ -33,7 +32,6 @@ With this nice util dxr3plugin generates and mange a log file. In this file the developer/enduser can find informations and can find errors, problems and ohter stuff. - The logging class is now thread-safe! */ class cLog : public Singleton<cLog> { @@ -43,36 +41,31 @@ public: ~cLog() { Close(); } - void SetForceFlush(const bool v) { Lock(); m_ForeFlush = v; Unlock(); } + void SetForceFlush(const bool v) { m_ForeFlush = v; } bool GetForceFlush() const { return m_ForeFlush; } // write type data to log file. template <class Type> inline cLog& operator << ( Type item ) { - Lock(); if (m_LogOpen) { m_LogStream << item; if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } inline cLog& operator << ( size_t item ) { - Lock(); if (m_LogOpen) { m_LogStream << (unsigned int)item; if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } inline cLog& operator << ( bool item ) { - Lock(); if (m_LogOpen) { if (item == true) @@ -85,7 +78,6 @@ public: } if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } @@ -96,12 +88,6 @@ private: void Open(std::string Filename); // with this function we open our logfile void Close(); // with this function we close our logfile - -protected: - static cMutex* m_pMutex; ///< mutex - - static void Lock() { cLog::m_pMutex->Lock(); } - static void Unlock() { cLog::m_pMutex->Unlock(); } }; |