BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Classes | Namespaces | Macros | Typedefs | Functions
log_message.hpp File Reference

Defines types and helper macros necessary for generating log messages. More...

#include <fc/config.hpp>
#include <fc/time.hpp>
#include <fc/variant_object.hpp>
#include <memory>
#include <string>

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

 fc
 
 fc::detail
 

Macros

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

Typedefs

typedef std::vector< log_message > fc::log_messages
 

Functions

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

Detailed Description

Defines types and helper macros necessary for generating log messages.

Definition in file log_message.hpp.

Macro Definition Documentation

#define __func__   __FUNCTION__

Definition at line 140 of file log_message.hpp.

#define FC_LOG_CONTEXT (   LOG_LEVEL)    fc::log_context( fc::log_level::LOG_LEVEL, (const char*)__FILE__, __LINE__, (const char*)__func__ )

Automatically captures the File, Line, and Method names and passes them to the constructor of fc::log_context along with LOG_LEVEL.

Parameters
LOG_LEVEL- a valid log_level::Enum name.

Definition at line 149 of file log_message.hpp.

#define FC_LOG_MESSAGE (   LOG_LEVEL,
  FORMAT,
  ... 
)
Value:
FORMAT, \
#define FC_MAX_LOG_OBJECT_DEPTH
Definition: config.hpp:8
#define FC_LOG_CONTEXT(LOG_LEVEL)
Automatically captures the File, Line, and Method names and passes them to the constructor of fc::log...
aggregates a message along with the context and associated meta-information.

A helper method for generating log messages.

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 161 of file log_message.hpp.

Function Documentation

FC_REFLECT_TYPENAME ( fc::log_message  )