56 typedef std::vector<std::string>::const_iterator
msg_vec_it;
69 LOGTYPE log_type, std::string file,
int lnumber, std::string func)
71 message(std::move(message)),
73 call_file(std::move(file)),
74 call_file_line_num(lnumber),
75 call_func(std::move(func))
77 this->t = std::chrono::system_clock::now();
90 std::vector<std::string> message_vec,
LOGTYPE log_type,
91 std::string file,
int lnumber, std::string func)
93 message_vec(std::move(message_vec)),
95 call_file(std::move(file)),
96 call_file_line_num(lnumber),
97 call_func(std::move(func))
99 this->t = std::chrono::system_clock::now();
109 return std::chrono::system_clock::to_time_t(this->t);
153 std::chrono::system_clock::time_point t;
159 std::vector<std::string> message_vec;
164 int call_file_line_num;
165 std::string call_func;
169 #endif // LOGMESSAGE_H std::string get_call_file()
Return file from where this log message was issued.
Definition: logmessage.h:140
std::string get_message()
Get the log message.
Definition: logmessage.h:120
LOGTYPE
The LOGTYPE enum stands for the LogMessage type.
Definition: logmessage.h:47
msg_vec_it get_msg_vec_end()
Returns a constant iterator pointing the end of the message vector.
Definition: logmessage.h:135
ealogger::constants::LOG_LEVEL get_severity()
Returns the severity of the message.
Definition: logmessage.h:115
Definition: logmessage.h:49
Global ealogger constants.
Main namespace for ealogger.
Definition: conversion_pattern.h:28
std::vector< std::string >::const_iterator msg_vec_it
A constant iterator typedef that is internally used.
Definition: logmessage.h:56
int get_call_file_line()
Return line number in file from where this log message was issued.
Definition: logmessage.h:145
LogMessage(ealogger::constants::LOG_LEVEL severity, std::vector< std::string > message_vec, LOGTYPE log_type, std::string file, int lnumber, std::string func)
Initializes a log message object with a vector of message strings.
Definition: logmessage.h:89
Definition: logmessage.h:48
LogMessage(ealogger::constants::LOG_LEVEL severity, std::string message, LOGTYPE log_type, std::string file, int lnumber, std::string func)
Initializes a log message object.
Definition: logmessage.h:68
std::time_t get_timepoint()
Return the time_point when this message was created.
Definition: logmessage.h:107
Log message struct.
Definition: logmessage.h:42
msg_vec_it get_msg_vec_begin()
Returns a constant iterator pointing the begin of the message vector.
Definition: logmessage.h:130
LOGTYPE get_log_type()
Get the log message type.
Definition: logmessage.h:125
std::string get_call_func()
Return function name from where this log message was issued.
Definition: logmessage.h:150
LOG_LEVEL
An enumaration representing the supported loglevels.
Definition: global.h:58