#include <array>
#include <atomic>
#include <chrono>
#include <functional>
#include <mutex>
#include <sstream>
#include <string>
#include <string_view>
#include <thread>
#include <unordered_map>
Go to the source code of this file.
◆ LOG
#define LOG |
( |
|
osstream, |
|
|
|
level |
|
) |
| |
Value: do { \
break; \
std::ostringstream logger_ostringstream; \
logger_ostringstream << logger.
GetDate().rdbuf() \
<< "(" << std::this_thread::get_id() << ")] " \
<<
file_name(__FILE__) <<
'(' << __LINE__ <<
"): " << osstream <<
'\n'; \
logger.
Log(logger_ostringstream.str()); \
} while(0)
constexpr const char * file_name(const char *path)
LogLevel GetLogLevel() const
std::stringstream GetDate() const
void Log(const std::string &s)
static Logger & GetInstance()
std::string GetThreadName(const std::thread::id id)
Get the name of a given thread.
static constexpr std::array< std::string_view, static_cast< size_t >(LogLevel::NUM_LOG_LEVEL)> level_strings
Definition at line 28 of file Logger.hpp.
◆ LOG_DEBUG
◆ LOG_ERROR
◆ LOG_FATAL
◆ LOG_INFO
◆ LOG_TRACE
◆ LOG_WARNING
◆ file_name()
constexpr const char * file_name |
( |
const char * |
path | ) |
|
|
constexpr |