6 #include "noncopyable.h"
 
   8 const char * LogDate(time_t t);
 
   9 //-----------------------------------------------------------------------------
 
  11 STG_LOGGER & GetStgLogger();
 
  12 //-----------------------------------------------------------------------------
 
  13 class STG_LOGGER_LOCKER : private NONCOPYABLE
 
  16     STG_LOGGER_LOCKER(pthread_mutex_t * m) : mutex(m) { pthread_mutex_lock(mutex); };
 
  17     ~STG_LOGGER_LOCKER() { pthread_mutex_unlock(mutex); };
 
  19     pthread_mutex_t * mutex;
 
  21 //-----------------------------------------------------------------------------
 
  24 friend STG_LOGGER & GetStgLogger();
 
  28     void SetLogFileName(const std::string & fn);
 
  29     void operator()(const char * fmt, ...);
 
  33     const char * LogDate(time_t t);
 
  36     pthread_mutex_t mutex;
 
  38 //-----------------------------------------------------------------------------