mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Improve homogeneity of rsdebug
Offer variadic style macros also for RsInfo...RsFatal
This commit is contained in:
parent
680d9cde85
commit
f99a8a0fc6
@ -149,6 +149,7 @@ RS_DBG4("Hello 4 ", "my debug ", my_variable) << " message " << variable2;
|
||||
* this, so we suggest to use variadic style for debug messages.
|
||||
*/
|
||||
using RsDbg = t_RsLogger<RsLoggerCategories::DEBUG>;
|
||||
#define RS_DBG(...) RsDbg(__PRETTY_FUNCTION__, " ", __VA_ARGS__)
|
||||
|
||||
/**
|
||||
* Comfortable log information reporting helper, supports chaining like
|
||||
@ -159,16 +160,20 @@ RsInfo() << __PRETTY_FUNCTION__ << "My information message" << std::cerr;
|
||||
@endcode
|
||||
*/
|
||||
using RsInfo = t_RsLogger<RsLoggerCategories::INFO>;
|
||||
#define RS_INFO(...) RsInfo(__PRETTY_FUNCTION__, " ", __VA_ARGS__)
|
||||
|
||||
/// Similar to @see RsInfo but for warning messages
|
||||
using RsWarn = t_RsLogger<RsLoggerCategories::WARNING>;
|
||||
#define RS_WARN(...) RsWarn(__PRETTY_FUNCTION__, " ", __VA_ARGS__)
|
||||
|
||||
/// Similar to @see RsInfo but for error messages
|
||||
using RsErr = t_RsLogger<RsLoggerCategories::ERROR>;
|
||||
#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<RsLoggerCategories::FATAL>;
|
||||
#define RS_FATAL(...) RsFatal(__PRETTY_FUNCTION__, " ", __VA_ARGS__)
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user