#include <ored/utilities/log.hpp>
|
| EventMessage (const std::string &msg, const std::string &msgKey, const std::map< std::string, boost::any > data={}) |
|
std::string | msg () const |
| return a std::string for the log file More...
|
|
void | emitLog () const |
| generate Boost log record to pass to corresponding sinks More...
|
|
virtual | ~JSONMessage () |
|
virtual std::string | msg () const =0 |
| return a std::string for the log file More...
|
|
void | log () const |
| generate Boost log record to pass to corresponding sinks More...
|
|
const std::string | json () const |
| create JSON-like output from the data More...
|
|
void | set (const std::string &key, const boost::any &value) |
|
|
static constexpr const char * | name = "EventMessage" |
|
|
virtual void | emitLog () const =0 |
| generate Boost log record - this method is called by log() More...
|
|
static std::string | jsonify (const boost::any &) |
|
std::map< std::string, boost::any > | data_ |
|
Definition at line 714 of file log.hpp.
◆ EventMessage()
EventMessage |
( |
const std::string & |
msg, |
|
|
const std::string & |
msgKey, |
|
|
const std::map< std::string, boost::any > |
data = {} |
|
) |
| |
Definition at line 716 of file log.hpp.
716 {}) {
719 }
std::string msg() const
return a std::string for the log file
std::map< std::string, boost::any > data_
◆ msg()
std::string msg |
( |
| ) |
const |
|
virtual |
return a std::string for the log file
Implements JSONMessage.
Definition at line 724 of file log.hpp.
724{
return std::string(
name) + std::string(
" ") +
json(); }
static constexpr const char * name
const std::string json() const
create JSON-like output from the data
◆ emitLog()
generate Boost log record to pass to corresponding sinks
Implements JSONMessage.
Definition at line 622 of file log.cpp.
622 {
623 lsrc::severity_logger_mt<oreSeverity> lg;
624 lg.add_attribute(messageType.get_name(), lattr::constant<string>(
name));
625 BOOST_LOG_SEV(lg, oreSeverity::alert) <<
json();
626 MLOG(oreSeverity::alert,
msg());
627}
◆ name
constexpr const char* name = "EventMessage" |
|
staticconstexpr |
◆ message_