8 #include "stg/noncopyable.h"
10 const char * LogDate(time_t t);
11 //-----------------------------------------------------------------------------
13 STG_LOGGER & GetStgLogger();
14 //-----------------------------------------------------------------------------
15 class STG_LOGGER_LOCKER : private NONCOPYABLE
18 STG_LOGGER_LOCKER(pthread_mutex_t * m) : mutex(m) { pthread_mutex_lock(mutex); };
19 ~STG_LOGGER_LOCKER() { pthread_mutex_unlock(mutex); };
21 pthread_mutex_t * mutex;
23 //-----------------------------------------------------------------------------
26 friend STG_LOGGER & GetStgLogger();
30 void SetLogFileName(const std::string & fn);
31 void operator()(const char * fmt, ...);
35 const char * LogDate(time_t t);
38 pthread_mutex_t mutex;
40 //-----------------------------------------------------------------------------