diff --git a/libretroshare/src/util/rsdebug.h b/libretroshare/src/util/rsdebug.h index 4a88d8c90..71645e6dc 100644 --- a/libretroshare/src/util/rsdebug.h +++ b/libretroshare/src/util/rsdebug.h @@ -148,7 +148,8 @@ RS_DBG4("Hello 4 ", "my debug ", my_variable) << " message " << variable2; * even if are not printed, due to how C++ is made it is not possible to avoid * this, so we suggest to use variadic style for debug messages. */ -using RsDbg = t_RsLogger; +using RsDbg = t_RsLogger; +#define RS_DBG(...) RsDbg(__PRETTY_FUNCTION__, " ", __VA_ARGS__) /** * Comfortable log information reporting helper, supports chaining like @@ -158,17 +159,21 @@ using RsDbg = t_RsLogger; RsInfo() << __PRETTY_FUNCTION__ << "My information message" << std::cerr; @endcode */ -using RsInfo = t_RsLogger; +using RsInfo = t_RsLogger; +#define RS_INFO(...) RsInfo(__PRETTY_FUNCTION__, " ", __VA_ARGS__) /// Similar to @see RsInfo but for warning messages -using RsWarn = t_RsLogger; +using RsWarn = t_RsLogger; +#define RS_WARN(...) RsWarn(__PRETTY_FUNCTION__, " ", __VA_ARGS__) /// Similar to @see RsInfo but for error messages -using RsErr = t_RsLogger; +using RsErr = t_RsLogger; +#define RS_ERR(...) RsErr(__PRETTY_FUNCTION__, " ", __VA_ARGS__) /** Similar to @see RsInfo but for fatal errors (the ones which cause RetroShare * to terminate) messages */ -using RsFatal = t_RsLogger; +using RsFatal = t_RsLogger; +#define RS_FATAL(...) RsFatal(__PRETTY_FUNCTION__, " ", __VA_ARGS__) /**