restructure project
This commit is contained in:
		
							
								
								
									
										14
									
								
								ixcore/ixcore/utils/IXCoreLogger.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								ixcore/ixcore/utils/IXCoreLogger.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| #include "ixcore/utils/IXCoreLogger.h" | ||||
|  | ||||
|  | ||||
| namespace ix | ||||
| { | ||||
| // Default do nothing logger | ||||
| IXCoreLogger::LogFunc IXCoreLogger::_currentLogger = [](const char* /*msg*/){}; | ||||
|  | ||||
| void IXCoreLogger::Log(const char* msg) | ||||
| { | ||||
|     _currentLogger(msg); | ||||
| } | ||||
|  | ||||
| } // ix | ||||
							
								
								
									
										18
									
								
								ixcore/ixcore/utils/IXCoreLogger.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								ixcore/ixcore/utils/IXCoreLogger.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| #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; | ||||
|     }; | ||||
|  | ||||
| } // namespace ix | ||||
		Reference in New Issue
	
	Block a user