X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c0fff5a4f4e765e5bb9f01a5d380cbdc098d04e6..d0175e4206e5856ddec364135b265a13ded8ce29:/stglibs/logger.lib/logger.cpp diff --git a/stglibs/logger.lib/logger.cpp b/stglibs/logger.lib/logger.cpp index 6289618e..4a455257 100644 --- a/stglibs/logger.lib/logger.cpp +++ b/stglibs/logger.lib/logger.cpp @@ -97,18 +97,10 @@ else } } //----------------------------------------------------------------------------- -PLUGIN_LOGGER::PLUGIN_LOGGER(const STG_LOGGER & logger, const std::string & pn) - : STG_LOGGER(), - pluginName(pn) +PLUGIN_LOGGER::PLUGIN_LOGGER(const STG_LOGGER& logger, const std::string& pn) + : m_parent(logger), + m_pluginName(pn) { - SetLogFileName(logger.fileName); -} -//----------------------------------------------------------------------------- -PLUGIN_LOGGER::PLUGIN_LOGGER(const PLUGIN_LOGGER & rhs) - : STG_LOGGER(), - pluginName(rhs.pluginName) -{ - SetLogFileName(fileName); } //----------------------------------------------------------------------------- void PLUGIN_LOGGER::operator()(const char * fmt, ...) const @@ -120,12 +112,12 @@ va_start(vl, fmt); vsnprintf(buff, sizeof(buff), fmt, vl); va_end(vl); -STG_LOGGER::operator()("[%s] %s", pluginName.c_str(), buff); +m_parent("[%s] %s", m_pluginName.c_str(), buff); } //----------------------------------------------------------------------------- void PLUGIN_LOGGER::operator()(const std::string & line) const { -STG_LOGGER::operator()("[%s] %s", pluginName.c_str(), line.c_str()); +m_parent("[%s] %s", m_pluginName.c_str(), line.c_str()); } //----------------------------------------------------------------------------- PLUGIN_LOGGER GetPluginLogger(const STG_LOGGER & logger, const std::string & pluginName)