mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 01:07:57 +00:00
Remove old Log macros
This commit is contained in:
@@ -19,24 +19,6 @@ namespace boost {
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// DEPRECATED
|
||||
// Put at the beginning of a C++ file that needs its own log partition
|
||||
#define SETUP_LOG() static LogPartition logPartition(__FILE__)
|
||||
#define SETUP_NLOG(x) static LogPartition logPartition(x)
|
||||
|
||||
// DEPRECATED
|
||||
// Standard conditional log
|
||||
#define cLog(x) if (!logPartition.doLog(x)) do {} while (0); else Log(x, logPartition)
|
||||
|
||||
// DEPRECATED
|
||||
// Log only if an additional condition 'c' is true. Condition is not computed if not needed
|
||||
#define tLog(c,x) if (!logPartition.doLog(x) || !(c)) do {} while(0); else Log(x, logPartition)
|
||||
|
||||
// DEPRECATED
|
||||
// Check if should log
|
||||
#define sLog(x) (logPartition.doLog(x))
|
||||
|
||||
|
||||
enum LogSeverity
|
||||
{
|
||||
lsINVALID = -1, // used to indicate an invalid severity
|
||||
@@ -134,8 +116,16 @@ public:
|
||||
static std::string rotateLog(void);
|
||||
};
|
||||
|
||||
// Manually test for whether we should log
|
||||
//
|
||||
#define ShouldLog(s, k) (LogPartition::get <k> ().doLog (s))
|
||||
|
||||
// Write to the log at the given severity level
|
||||
//
|
||||
#define WriteLog(s, k) if (!ShouldLog (s, k)) do {} while (0); else Log (s, LogPartition::get <k> ())
|
||||
|
||||
// Write to the log conditionally
|
||||
//
|
||||
#define CondLog(c, s, k) if (!ShouldLog (s, k) || !(c)) do {} while(0); else Log(s, LogPartition::get <k> ())
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user