mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
modules changes
* speedup widget destruction checks * rework outfit module using grid layout and the new design * fixes in console, terminal, textmessage modules
This commit is contained in:
@@ -44,6 +44,8 @@ void Logger::log(Fw::LogLevel level, const std::string& message)
|
||||
|
||||
std::size_t now = std::time(NULL);
|
||||
m_logMessages.push_back(LogMessage(level, outmsg, now));
|
||||
if(m_logMessages.size() > MAX_LOG_HISTORY)
|
||||
m_logMessages.pop_front();
|
||||
|
||||
if(m_onLog)
|
||||
m_onLog(level, outmsg, now);
|
||||
|
@@ -34,6 +34,10 @@ struct LogMessage {
|
||||
|
||||
class Logger
|
||||
{
|
||||
enum {
|
||||
MAX_LOG_HISTORY = 1000
|
||||
};
|
||||
|
||||
typedef std::function<void(Fw::LogLevel, std::string, std::size_t)> OnLogCallback;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user