5 #include "messagefacility/Utilities/formatTime.h" 11 MessageFacilityMsg::~MessageFacilityMsg() {}
13 MessageFacilityMsg::MessageFacilityMsg(
ErrorObj const& msg)
14 : msg_(new
ErrorObj(msg)), empty_(false)
24 msg_->setTimestamp(tv);
38 msg_->setID(category);
45 msg_->setHostName(hostname);
52 msg_->setHostAddr(hostaddr);
66 msg_->setApplication(app);
73 msg_->setModule(module);
80 msg_->setIteration(s);
87 msg_->setIteration(s);
96 *
msg_ <<
" " << file <<
":" << line <<
"\n" <<
message;
115 return msg_->timestamp();
122 return mf::timestamp::Legacy::get_time(
msg_->timestamp());
128 return msg_->xid().severity().getInputStr();
134 return msg_->xid().id();
140 return msg_->xid().hostname();
146 return msg_->xid().hostaddr();
152 return msg_->xid().pid();
158 return msg_->xid().application();
164 return msg_->xid().module();
170 return msg_->iteration();
176 return msg_->iteration();
185 it !=
msg_->items().end();
202 it !=
msg_->items().end();
206 istringstream
ss(*it);
223 it !=
msg_->items().end();
void setApplication(std::string const &)
std::string iteration() const
std::string category() const
void setMessage(std::string const &file, std::string const &line, std::string const &message)
std::string message() const
ErrorObj ErrorObject() const
void setHostaddr(std::string const &)
void setContext(std::string const &)
void setSeverity(std::string const &)
void setCategory(std::string const &)
void setTimestamp(timeval const &)
std::string context() const
std::string application() const
std::string module() const
void setHostname(std::string const &)
void setModule(std::string const &)
std::string hostaddr() const
std::string severity() const
void setIteration(std::string const &)
timeval timestamp() const
std::string timestr() const
std::unique_ptr< ErrorObj > msg_
std::string hostname() const