mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 07:28:12 +08:00
[CORE][CHG] Prevent logging same msg
This commit is contained in:
parent
36225d7ea3
commit
cd75d7a83d
@ -12,6 +12,8 @@ void Logger::setLogLevel(LogLevel level) {
|
||||
|
||||
void Logger::log(LogLevel level, std::string message) {
|
||||
if (level < _level) return;
|
||||
if (message == _previous) return;
|
||||
_previous = message;
|
||||
|
||||
switch (level) {
|
||||
case DEBUG:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define LOCALLOGLEVEL DEBUG
|
||||
#define LOCALLOGLEVEL INFO
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
@ -10,6 +10,7 @@ public:
|
||||
|
||||
private:
|
||||
static LogLevel _level;
|
||||
static std::string _previous;
|
||||
|
||||
public:
|
||||
static void setLogLevel(LogLevel level);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user