BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | List of all members
fc::log_message Class Reference

aggregates a message along with the context and associated meta-information. More...

#include <log_message.hpp>

Public Member Functions

 log_message ()
 
 log_message (log_context ctx, std::string format, variant_object args=variant_object())
 
 ~log_message ()
 
 log_message (const variant &v, uint32_t max_depth)
 
variant to_variant (uint32_t max_depth) const
 
std::string get_message () const
 
log_context get_context () const
 
std::string get_format () const
 
variant_object get_data () const
 

Detailed Description

aggregates a message along with the context and associated meta-information.

Note
log_message has reference semantics, all copies refer to the same log message and the message is read-only after construction.

When converted to JSON, log_message has the following form:

{
"context" : { ... },
"format" : "string with ${keys}",
"data" : { "keys" : "values" }
}
See also
FC_LOG_MESSAGE

Definition at line 106 of file log_message.hpp.

Constructor & Destructor Documentation

◆ log_message() [1/3]

fc::log_message::log_message ( )

Definition at line 184 of file log_message.cpp.

◆ log_message() [2/3]

fc::log_message::log_message ( log_context  ctx,
std::string  format,
variant_object  args = variant_object() 
)
Parameters
ctx- generally provided using the FC_LOG_CONTEXT(LEVEL) macro
format- the format
args- the arguments

Definition at line 187 of file log_message.cpp.

◆ ~log_message()

fc::log_message::~log_message ( )

Definition at line 183 of file log_message.cpp.

◆ log_message() [3/3]

fc::log_message::log_message ( const variant v,
uint32_t  max_depth 
)

Definition at line 194 of file log_message.cpp.

Member Function Documentation

◆ get_context()

log_context fc::log_message::get_context ( ) const

Definition at line 209 of file log_message.cpp.

◆ get_data()

variant_object fc::log_message::get_data ( ) const

Definition at line 211 of file log_message.cpp.

◆ get_format()

string fc::log_message::get_format ( ) const

Definition at line 210 of file log_message.cpp.

◆ get_message()

string fc::log_message::get_message ( ) const

Definition at line 213 of file log_message.cpp.

◆ to_variant()

variant fc::log_message::to_variant ( uint32_t  max_depth) const

Definition at line 201 of file log_message.cpp.


The documentation for this class was generated from the following files: