Classes |
class | gnash::LogFile |
class | gnash::__Host_Function_Report__ |
Namespaces |
namespace | gnash |
| Anonymous namespace for callbacks, local functions, event handlers etc.
|
Defines |
#define | DEFAULT_LOGFILE "gnash-dbg.log" |
#define | _(String) gettext (String) |
#define | N_(String) gettext_noop (String) |
#define | LOG_ONCE(x) |
#define | __FUNCDNAME__ __FUNCTION__ |
#define | TOKENIZE_FORMAT(z, n, t) % t##n |
#define | TOKENIZE_ARGS(z, n, t) BOOST_PP_COMMA_IF(n) const T##n& t##n |
#define | LOG_TYPES |
#define | LOG_TEMPLATES(z, n, data) |
#define | ARG_NUMBER 10 |
| Defines the maximum number of template arguments.
|
#define | GENERATE_LOG_TYPES(r, _, t) BOOST_PP_REPEAT(ARG_NUMBER, LOG_TEMPLATES, t) |
#define | VERBOSE_PARSE 1 |
#define | VERBOSE_ACTION 1 |
#define | VERBOSE_ASCODING_ERRORS 1 |
#define | VERBOSE_MALFORMED_SWF 1 |
#define | VERBOSE_MALFORMED_AMF 1 |
#define | VERBOSE_NETWORKING 1 |
#define | IF_VERBOSE_PARSE(x) |
#define | IF_VERBOSE_ACTION(x) |
#define | IF_VERBOSE_NETWORK(x) |
#define | IF_VERBOSE_ASCODING_ERRORS(x) |
#define | IF_VERBOSE_MALFORMED_SWF(x) |
#define | IF_VERBOSE_MALFORMED_AMF(x) |
#define | dummystr(x) # x |
#define | dummyestr(x) dummystr(x) |
#define | __FUNCTION__ __FILE__":"dummyestr(__LINE__) |
#define | __PRETTY_FUNCTION__ __FUNCTION__ |
#define | GNASH_REPORT_FUNCTION gnash::log_debug("entering") |
#define | GNASH_REPORT_RETURN gnash::log_debug("returning") |
Functions |
void | gnash::processLog_network (const boost::format &fmt) |
void | gnash::processLog_error (const boost::format &fmt) |
void | gnash::processLog_unimpl (const boost::format &fmt) |
void | gnash::processLog_trace (const boost::format &fmt) |
void | gnash::processLog_debug (const boost::format &fmt) |
void | gnash::processLog_action (const boost::format &fmt) |
void | gnash::processLog_parse (const boost::format &fmt) |
void | gnash::processLog_security (const boost::format &fmt) |
void | gnash::processLog_swferror (const boost::format &fmt) |
void | gnash::processLog_amferror (const boost::format &fmt) |
void | gnash::processLog_aserror (const boost::format &fmt) |
void | gnash::processLog_abc (const boost::format &fmt) |
std::string | gnash::hexify (const unsigned char *bytes, size_t length, bool ascii) |
| Convert a sequence of bytes to hex or ascii format.
|
#define LOG_TEMPLATES |
( |
|
z, |
|
|
|
n, |
|
|
|
data | |
|
) |
| | |
Value:template<BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename T)>\
inline void log_##data(BOOST_PP_REPEAT(BOOST_PP_INC(n), TOKENIZE_ARGS, t)) \
{\
if (LogFile::getDefaultInstance().getVerbosity() == 0) return; \
boost::format f(t0); \
using namespace boost::io; \
f.exceptions(all_error_bits ^ (too_many_args_bit | \
too_few_args_bit | \
bad_format_string_bit)); \
processLog_##data(f BOOST_PP_REPEAT_FROM_TO(1, \
BOOST_PP_INC(n), \
TOKENIZE_FORMAT, t));\
}
This actually creates the template functions using the TOKENIZE functions above. The templates look like this: template<typename T0 , typename T1 , typename T2> void log_error(const T0& t0 , const T1& t1 , const T2& t2) { if (LogFile::getDefaultInstance().getVerbosity() == 0) return; boost::format f(t0); using namespace boost::io; f.exceptions(all_error_bits ^ (too_many_args_bit | too_few_args_bit | bad_format_string_bit)); processLog_error(f % t1 % t2); }
Only not as nicely indented.
Use "g++ -E log.h" or "cpp log.h" to check.