12 void setFileName(const std::string& fn);
13 void operator()(const char * fmt, ...) const;
14 void operator()(const std::string & line) const { logString(line.c_str()); }
19 const char* logDate(time_t t) const;
20 void logString(const char* str) const;
22 mutable std::mutex mutex;
25 //-----------------------------------------------------------------------------
29 static PluginLogger get(std::string pluginName)
31 return PluginLogger(std::move(pluginName));
34 PluginLogger(PluginLogger&& rhs)
35 : m_parent(Logger::get()),
36 m_pluginName(std::move(rhs.m_pluginName))
38 PluginLogger& operator=(PluginLogger&& rhs)
40 std::lock_guard<std::mutex> lock(m_mutex);
41 m_pluginName = std::move(rhs.m_pluginName);
45 void operator()(const char* fmt, ...) const;
46 void operator()(const std::string& line) const;
49 explicit PluginLogger(std::string pn)
50 : m_parent(Logger::get()),
51 m_pluginName(std::move(pn))
54 mutable std::mutex m_mutex;
56 std::string m_pluginName;