#include <fc/string.hpp>
#include <fc/time.hpp>
#include <fc/log/log_message.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/size.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/preprocessor/punctuation/paren.hpp>
Go to the source code of this file.
|
#define | DEFAULT_LOGGER "default" |
|
#define | FC_MULTILINE_MACRO_BEGIN do { |
|
#define | FC_MULTILINE_MACRO_END } while (0) |
|
#define | fc_dlog(LOGGER, FORMAT, ...) |
|
#define | fc_ilog(LOGGER, FORMAT, ...) |
|
#define | fc_wlog(LOGGER, FORMAT, ...) |
|
#define | fc_elog(LOGGER, FORMAT, ...) |
|
#define | dlog(FORMAT, ...) |
|
#define | ulog(FORMAT, ...) |
|
#define | ilog(FORMAT, ...) |
|
#define | wlog(FORMAT, ...) |
|
#define | elog(FORMAT, ...) |
|
#define | FC_FORMAT_ARG(r, unused, base) |
|
#define | FC_FORMAT_ARGS(r, unused, base) |
|
#define | FC_FORMAT(SEQ) |
|
#define | FC_FORMAT_ARG_PARAMS(...) |
|
#define | idump(SEQ) |
|
#define | wdump(SEQ) |
|
#define | edump(SEQ) |
|
◆ DEFAULT_LOGGER
#define DEFAULT_LOGGER "default" |
◆ dlog
#define dlog |
( |
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
static logger get(const fc::string &name=DEFAULT_LOGGER)
#define FC_LOG_MESSAGE(LOG_LEVEL, FORMAT,...)
A helper method for generating log messages.
#define FC_MULTILINE_MACRO_END
Definition at line 101 of file logger.hpp.
101#define dlog( FORMAT, ... ) \
102 FC_MULTILINE_MACRO_BEGIN \
103 if( (fc::logger::get(DEFAULT_LOGGER)).is_enabled( fc::log_level::debug ) ) \
104 (fc::logger::get(DEFAULT_LOGGER)).log( FC_LOG_MESSAGE( debug, FORMAT, __VA_ARGS__ ) ); \
105 FC_MULTILINE_MACRO_END
◆ edump
Value:
#define FC_FORMAT_ARG_PARAMS(...)
Definition at line 162 of file logger.hpp.
162#define edump( SEQ ) \
163 elog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) )
◆ elog
#define elog |
( |
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 130 of file logger.hpp.
130#define elog( FORMAT, ... ) \
131 FC_MULTILINE_MACRO_BEGIN \
132 if( (fc::logger::get(DEFAULT_LOGGER)).is_enabled( fc::log_level::error ) ) \
133 (fc::logger::get(DEFAULT_LOGGER)).log( FC_LOG_MESSAGE( error, FORMAT, __VA_ARGS__ ) ); \
134 FC_MULTILINE_MACRO_END
◆ fc_dlog
#define fc_dlog |
( |
| LOGGER, |
|
|
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 77 of file logger.hpp.
77#define fc_dlog( LOGGER, FORMAT, ... ) \
78 FC_MULTILINE_MACRO_BEGIN \
79 if( (LOGGER).is_enabled( fc::log_level::debug ) ) \
80 (LOGGER).log( FC_LOG_MESSAGE( debug, FORMAT, __VA_ARGS__ ) ); \
81 FC_MULTILINE_MACRO_END
◆ fc_elog
#define fc_elog |
( |
| LOGGER, |
|
|
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 95 of file logger.hpp.
95#define fc_elog( LOGGER, FORMAT, ... ) \
96 FC_MULTILINE_MACRO_BEGIN \
97 if( (LOGGER).is_enabled( fc::log_level::error ) ) \
98 (LOGGER).log( FC_LOG_MESSAGE( error, FORMAT, __VA_ARGS__ ) ); \
99 FC_MULTILINE_MACRO_END
◆ FC_FORMAT
Value:
#define FC_FORMAT_ARG(r, unused, base)
Definition at line 150 of file logger.hpp.
150#define FC_FORMAT( SEQ )\
151 BOOST_PP_SEQ_FOR_EACH( FC_FORMAT_ARG, v, SEQ )
◆ FC_FORMAT_ARG
#define FC_FORMAT_ARG |
( |
| r, |
|
|
| unused, |
|
|
| base ) |
Value: BOOST_PP_STRINGIZE(base) ": ${" BOOST_PP_STRINGIZE( base ) "} "
Definition at line 144 of file logger.hpp.
144#define FC_FORMAT_ARG(r, unused, base) \
145 BOOST_PP_STRINGIZE(base) ": ${" BOOST_PP_STRINGIZE( base ) "} "
◆ FC_FORMAT_ARG_PARAMS
#define FC_FORMAT_ARG_PARAMS |
( |
| ... | ) |
|
Value:
#define FC_FORMAT_ARGS(r, unused, base)
Definition at line 155 of file logger.hpp.
155#define FC_FORMAT_ARG_PARAMS( ... )\
156 BOOST_PP_SEQ_FOR_EACH( FC_FORMAT_ARGS, v, __VA_ARGS__ )
◆ FC_FORMAT_ARGS
#define FC_FORMAT_ARGS |
( |
| r, |
|
|
| unused, |
|
|
| base ) |
Value: BOOST_PP_LPAREN() BOOST_PP_STRINGIZE(base),
fc::variant(base) BOOST_PP_RPAREN()
Definition at line 147 of file logger.hpp.
147#define FC_FORMAT_ARGS(r, unused, base) \
148 BOOST_PP_LPAREN() BOOST_PP_STRINGIZE(base),fc::variant(base) BOOST_PP_RPAREN()
◆ fc_ilog
#define fc_ilog |
( |
| LOGGER, |
|
|
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 83 of file logger.hpp.
83#define fc_ilog( LOGGER, FORMAT, ... ) \
84 FC_MULTILINE_MACRO_BEGIN \
85 if( (LOGGER).is_enabled( fc::log_level::info ) ) \
86 (LOGGER).log( FC_LOG_MESSAGE( info, FORMAT, __VA_ARGS__ ) ); \
87 FC_MULTILINE_MACRO_END
◆ FC_MULTILINE_MACRO_BEGIN
#define FC_MULTILINE_MACRO_BEGIN do { |
◆ FC_MULTILINE_MACRO_END
#define FC_MULTILINE_MACRO_END } while (0) |
◆ fc_wlog
#define fc_wlog |
( |
| LOGGER, |
|
|
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 89 of file logger.hpp.
89#define fc_wlog( LOGGER, FORMAT, ... ) \
90 FC_MULTILINE_MACRO_BEGIN \
91 if( (LOGGER).is_enabled( fc::log_level::warn ) ) \
92 (LOGGER).log( FC_LOG_MESSAGE( warn, FORMAT, __VA_ARGS__ ) ); \
93 FC_MULTILINE_MACRO_END
◆ idump
Value:
Definition at line 158 of file logger.hpp.
158#define idump( SEQ ) \
159 ilog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) )
◆ ilog
#define ilog |
( |
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 118 of file logger.hpp.
118#define ilog( FORMAT, ... ) \
119 FC_MULTILINE_MACRO_BEGIN \
120 if( (fc::logger::get(DEFAULT_LOGGER)).is_enabled( fc::log_level::info ) ) \
121 (fc::logger::get(DEFAULT_LOGGER)).log( FC_LOG_MESSAGE( info, FORMAT, __VA_ARGS__ ) ); \
122 FC_MULTILINE_MACRO_END
◆ ulog
#define ulog |
( |
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Sends the log message to a special 'user' log stream designed for messages that the end user may like to see.
Definition at line 111 of file logger.hpp.
111#define ulog( FORMAT, ... ) \
112 FC_MULTILINE_MACRO_BEGIN \
113 if( (fc::logger::get("user")).is_enabled( fc::log_level::debug ) ) \
114 (fc::logger::get("user")).log( FC_LOG_MESSAGE( debug, FORMAT, __VA_ARGS__ ) ); \
115 FC_MULTILINE_MACRO_END
◆ wdump
Value:
Definition at line 160 of file logger.hpp.
160#define wdump( SEQ ) \
161 wlog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) )
◆ wlog
#define wlog |
( |
| FORMAT, |
|
|
| ... ) |
Value: FC_MULTILINE_MACRO_BEGIN \
Definition at line 124 of file logger.hpp.
124#define wlog( FORMAT, ... ) \
125 FC_MULTILINE_MACRO_BEGIN \
126 if( (fc::logger::get(DEFAULT_LOGGER)).is_enabled( fc::log_level::warn ) ) \
127 (fc::logger::get(DEFAULT_LOGGER)).log( FC_LOG_MESSAGE( warn, FORMAT, __VA_ARGS__ ) ); \
128 FC_MULTILINE_MACRO_END