Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
log_message.hpp File Reference

Defines types and helper macros necessary for generating log messages.

#include <fc/time.hpp>
#include <fc/variant_object.hpp>
#include <memory>
Include dependency graph for log_message.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fc::log_level
 
class  fc::log_context
 provides information about where and when a log message was generated. More...
 
class  fc::log_message
 aggregates a message along with the context and associated meta-information. More...
 

Namespaces

namespace  fc
 namespace sysio::chain
 
namespace  fc::detail
 

Macros

#define __func__   __FUNCTION__
 
#define FC_LOG_CONTEXT(LOG_LEVEL)
 Automatically captures the File, Line, and Method names and passes them to the constructor of fc::log_context along with LOG_LEVEL.
 
#define FC_LOG_MESSAGE(LOG_LEVEL, FORMAT, ...)
 A helper method for generating log messages.
 

Typedefs

typedef std::vector< log_messagefc::log_messages
 

Functions

void fc::to_variant (log_level e, variant &v)
 
void fc::from_variant (const variant &e, log_level &ll)
 
void fc::to_variant (const log_context &l, variant &v)
 
void fc::from_variant (const variant &l, log_context &c)
 
void fc::to_variant (const log_message &l, variant &v)
 
void fc::from_variant (const variant &l, log_message &c)
 
 FC_REFLECT_TYPENAME (fc::log_message)
 

Macro Definition Documentation

◆ __func__

#define __func__   __FUNCTION__

Definition at line 144 of file log_message.hpp.

◆ FC_LOG_CONTEXT

#define FC_LOG_CONTEXT ( LOG_LEVEL)
Value:
fc::log_context( fc::log_level::LOG_LEVEL, __FILE__, __LINE__, __func__ )
provides information about where and when a log message was generated.
#define __func__
Parameters
LOG_LEVEL- a valid log_level::Enum name.

Definition at line 153 of file log_message.hpp.

153#define FC_LOG_CONTEXT(LOG_LEVEL) \
154 fc::log_context( fc::log_level::LOG_LEVEL, __FILE__, __LINE__, __func__ )

◆ FC_LOG_MESSAGE

#define FC_LOG_MESSAGE ( LOG_LEVEL,
FORMAT,
... )
Value:
fc::log_message( FC_LOG_CONTEXT(LOG_LEVEL), FORMAT, fc::mutable_variant_object()__VA_ARGS__ )
aggregates a message along with the context and associated meta-information.
An order-preserving dictionary of variants.
#define FC_LOG_CONTEXT(LOG_LEVEL)
Automatically captures the File, Line, and Method names and passes them to the constructor of fc::log...
Parameters
LOG_LEVELa valid log_level::Enum name to be passed to the log_context
FORMATA const char* string containing zero or more references to keys as "${key}"
...A set of key/value pairs denoted as ("key",val)("key2",val2)...

Definition at line 165 of file log_message.hpp.

165#define FC_LOG_MESSAGE( LOG_LEVEL, FORMAT, ... ) \
166 fc::log_message( FC_LOG_CONTEXT(LOG_LEVEL), FORMAT, fc::mutable_variant_object()__VA_ARGS__ )

Function Documentation

◆ FC_REFLECT_TYPENAME()

FC_REFLECT_TYPENAME ( fc::log_message )