Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
LoggerManager.cpp
Go to the documentation of this file.
1
2
7
8
9#include "Log/LoggerManager.h"
10#include "Log/Logger.h"
11
12namespace ECS { namespace Log { namespace Internal {
13
15 {
16
17 }
18
20 {
21 // cleanup logger
22 for (auto& it : this->m_Cache)
23 {
24 delete it.second;
25 it.second = nullptr;
26 }
27 }
28
30 {
31 auto it = this->m_Cache.find(name);
32 if (it == this->m_Cache.end())
33 {
34 this->m_Cache[name] = new Logger();
35 }
36
37 return this->m_Cache[name];
38 }
39
40}}} // namespace ECS::Log::Internal
LoggerCache m_Cache
Summary: Holds all acquired logger.
Definition: LoggerManager.h:37
Logger * GetLogger(const char *logger=DEFAULT_LOGGER)