refactor(Core/sLog): improve singleton management (#3801)

This commit is contained in:
Francesco Borzì
2020-12-06 15:59:08 +01:00
committed by GitHub
parent a06bfa6e5b
commit 9facd81e54
6 changed files with 214 additions and 92 deletions

View File

@@ -65,10 +65,11 @@ Log::~Log()
miscLogFile = NULL;
}
Log* Log::instance()
std::unique_ptr<ILog>& getLogInstance()
{
static Log instance;
return &instance;
static std::unique_ptr<ILog> instance = std::make_unique<Log>();
return instance;
}
void Log::SetLogLevel(char* Level)