This commit is contained in:
Ross Jacobs
2020-04-20 22:59:20 -07:00
committed by GitHub
parent 36257cbfe4
commit 5860c5c80b
50 changed files with 10078 additions and 8095 deletions

View File

@ -3,12 +3,12 @@
namespace ix
{
// Default do nothing logger
IXCoreLogger::LogFunc IXCoreLogger::_currentLogger = [](const char* /*msg*/){};
// Default do nothing logger
IXCoreLogger::LogFunc IXCoreLogger::_currentLogger = [](const char* /*msg*/) {};
void IXCoreLogger::Log(const char* msg)
{
_currentLogger(msg);
}
void IXCoreLogger::Log(const char* msg)
{
_currentLogger(msg);
}
} // ix
} // namespace ix

View File

@ -9,7 +9,10 @@ namespace ix
using LogFunc = std::function<void(const char*)>;
static void Log(const char* msg);
static void setLogFunction(LogFunc& func) { _currentLogger = func; }
static void setLogFunction(LogFunc& func)
{
_currentLogger = func;
}
private:
static LogFunc _currentLogger;