X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73f478b15a61946b2c78843b968ba69b95551c09..e7fdffe08f8ce456c82a85accdcc18151a8f7f39:/stglibs/logger.lib/include/stg/logger.h?ds=inline diff --git a/stglibs/logger.lib/include/stg/logger.h b/stglibs/logger.lib/include/stg/logger.h index 2c9c93fc..dc87178e 100644 --- a/stglibs/logger.lib/include/stg/logger.h +++ b/stglibs/logger.lib/include/stg/logger.h @@ -5,8 +5,6 @@ #include -const char * LogDate(time_t t); -//----------------------------------------------------------------------------- class STG_LOGGER; STG_LOGGER & GetStgLogger(); //----------------------------------------------------------------------------- @@ -31,17 +29,17 @@ friend class PLUGIN_LOGGER; public: ~STG_LOGGER(); void SetLogFileName(const std::string & fn); - void operator()(const char * fmt, ...); + void operator()(const char * fmt, ...) const; private: STG_LOGGER(); STG_LOGGER(const STG_LOGGER & rvalue); STG_LOGGER & operator=(const STG_LOGGER & rvalue); - const char * LogDate(time_t t); + const char * LogDate(time_t t) const; std::string fileName; - pthread_mutex_t mutex; + mutable pthread_mutex_t mutex; }; //----------------------------------------------------------------------------- class PLUGIN_LOGGER : private STG_LOGGER @@ -50,7 +48,7 @@ friend PLUGIN_LOGGER GetPluginLogger(const STG_LOGGER & logger, const std::strin public: PLUGIN_LOGGER(const PLUGIN_LOGGER & rhs); - void operator()(const char * fmt, ...); + void operator()(const char * fmt, ...) const; private: PLUGIN_LOGGER(const STG_LOGGER & logger, const std::string & pn);