1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Fixes excessive logging causing RMG slowdown

- Do not apply formatting on log entries that will be discarded due to
high log level
- Do not log incorrect access to visitablePos due to its numerous use by
RMG
This commit is contained in:
Ivan Savenko
2024-12-23 21:24:00 +00:00
parent 2272707175
commit 6da58a6871
4 changed files with 28 additions and 21 deletions

View File

@ -46,7 +46,7 @@ private:
/// The logger is used to log messages to certain targets of a specific domain/name.
/// It is thread-safe and can be used concurrently by several threads.
class DLL_LINKAGE CLogger: public vstd::CLoggerBase
class DLL_LINKAGE CLogger final: public vstd::CLoggerBase
{
public:
ELogLevel::ELogLevel getLevel() const;
@ -70,7 +70,7 @@ public:
private:
explicit CLogger(const CLoggerDomain & domain);
inline ELogLevel::ELogLevel getEffectiveLevel() const; /// Returns the log level applied on this logger whether directly or indirectly.
inline ELogLevel::ELogLevel getEffectiveLevel() const override; /// Returns the log level applied on this logger whether directly or indirectly.
inline void callTargets(const LogRecord & record) const;
CLoggerDomain domain;