aboutsummaryrefslogtreecommitdiff
path: root/src/common/Logging/Logger.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-16 16:31:40 +0200
committerShauren <shauren.trinity@gmail.com>2024-07-16 16:31:40 +0200
commit81bec6954fa6640e2942d836a856e6bc9d421bce (patch)
treed094109ee7dd6ea1e1ea4b8aebf0d5a5afc124e6 /src/common/Logging/Logger.h
parent14f7c0984f102c737f4d4849161243456c6bd71f (diff)
Core/Logging: Minor internal refactor
* Avoid formatting to output with fprintf * Use vector instead of unordered_map to store appenders in Logger
Diffstat (limited to 'src/common/Logging/Logger.h')
-rw-r--r--src/common/Logging/Logger.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/common/Logging/Logger.h b/src/common/Logging/Logger.h
index 046f5464f40..71f6396fd94 100644
--- a/src/common/Logging/Logger.h
+++ b/src/common/Logging/Logger.h
@@ -20,8 +20,8 @@
#include "Define.h"
#include "LogCommon.h"
-#include <unordered_map>
#include <string>
+#include <vector>
class Appender;
struct LogMessage;
@@ -31,8 +31,7 @@ class TC_COMMON_API Logger
public:
Logger(std::string const& name, LogLevel level);
- void addAppender(uint8 type, Appender* appender);
- void delAppender(uint8 type);
+ void addAppender(Appender* appender);
std::string const& getName() const;
LogLevel getLogLevel() const;
@@ -42,7 +41,7 @@ class TC_COMMON_API Logger
private:
std::string name;
LogLevel level;
- std::unordered_map<uint8, Appender*> appenders;
+ std::vector<Appender*> appenders;
};
#endif