Initial Commit
This commit is contained in:
commit
6088fc29ed
978 changed files with 353647 additions and 0 deletions
15
include/Helpers/Logger.hpp
Normal file
15
include/Helpers/Logger.hpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
static Logger& get();
|
||||
void add_log(const std::string& log, const std::function<void(const std::string&)> callback);
|
||||
void log(const std::string& log, const std::string& text);
|
||||
private:
|
||||
static Logger global;
|
||||
std::mutex logMutex;
|
||||
std::unordered_map<std::string, std::function<void(const std::string&)>> logs;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue