ZeroErr
|
LogInfo is a struct to store the meta data of the log message. More...
#include <log.h>
Public Member Functions | |
LogInfo (const char *filename, const char *function, const char *message, const char *category, unsigned line, unsigned size, LogSeverity severity) | |
Public Attributes | |
const char * | filename |
const char * | function |
const char * | message |
const char * | category |
unsigned | line |
unsigned | size |
LogSeverity | severity |
std::map< std::string, int > | names |
LogInfo is a struct to store the meta data of the log message.
LogInfo is a struct to store the meta data of the log message. It contains filename, function, message, category, line number, size, and severity. Those data is initialized when the first log message is created using a static local variable in the function where the log message is put.
For example: void foo() { log("Hello, {name}!", "John"); }
The inner implementation could be considered as (not exactly since message is allocated from a pool): void foo() { static LogInfo log_info{ FILE, func, "Hello, {name}!", ZEROERR_LOG_CATEGORY, LINE, sizeof("Hello, world!"), LogSeverity::INFO_l); LogMessage* logdata = new LogMessageImpl<std::string>("John"); logdata->info = }
zeroerr::LogInfo::LogInfo | ( | const char * | filename, |
const char * | function, | ||
const char * | message, | ||
const char * | category, | ||
unsigned | line, | ||
unsigned | size, | ||
LogSeverity | severity | ||
) |
const char* zeroerr::LogInfo::category |
const char* zeroerr::LogInfo::filename |
const char* zeroerr::LogInfo::function |
unsigned zeroerr::LogInfo::line |
const char* zeroerr::LogInfo::message |
std::map<std::string, int> zeroerr::LogInfo::names |
LogSeverity zeroerr::LogInfo::severity |
unsigned zeroerr::LogInfo::size |