IXCobraMetricsThreadedPublisher.cpp uses a lambda to log instead of std::cerr
This commit is contained in:
22
ws/ixcore/utils/IXCoreLogger.h
Normal file
22
ws/ixcore/utils/IXCoreLogger.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
|
||||
class IXCoreLogger
|
||||
{
|
||||
public:
|
||||
using LogFunc = std::function<void(const char*)>;
|
||||
static void Log(const char* msg);
|
||||
|
||||
static void setLogFunction(LogFunc& func) {
|
||||
_currentLogger = func;
|
||||
}
|
||||
|
||||
private:
|
||||
static LogFunc _currentLogger;
|
||||
|
||||
};
|
||||
|
||||
} // ix
|
Reference in New Issue
Block a user