9 STG_LOGGER & GetStgLogger();
10 //-----------------------------------------------------------------------------
11 class STG_LOGGER_LOCKER
14 STG_LOGGER_LOCKER(pthread_mutex_t * m) : mutex(m) { pthread_mutex_lock(mutex); }
15 ~STG_LOGGER_LOCKER() { pthread_mutex_unlock(mutex); }
18 STG_LOGGER_LOCKER(const STG_LOGGER_LOCKER & rvalue);
19 STG_LOGGER_LOCKER & operator=(const STG_LOGGER_LOCKER & rvalue);
21 pthread_mutex_t * mutex;
23 //-----------------------------------------------------------------------------
26 friend STG_LOGGER & GetStgLogger();
27 friend class PLUGIN_LOGGER;
31 void SetLogFileName(const std::string & fn);
32 void operator()(const char * fmt, ...) const;
36 STG_LOGGER(const STG_LOGGER & rvalue);
37 STG_LOGGER & operator=(const STG_LOGGER & rvalue);
39 const char * LogDate(time_t t) const;
42 mutable pthread_mutex_t mutex;
44 //-----------------------------------------------------------------------------
45 class PLUGIN_LOGGER : private STG_LOGGER
47 friend PLUGIN_LOGGER GetPluginLogger(const STG_LOGGER & logger, const std::string & pluginName);
50 PLUGIN_LOGGER(const PLUGIN_LOGGER & rhs);
51 void operator()(const char * fmt, ...) const;
54 PLUGIN_LOGGER(const STG_LOGGER & logger, const std::string & pn);
55 std::string pluginName;
58 PLUGIN_LOGGER GetPluginLogger(const STG_LOGGER & logger, const std::string & pluginName);