From 8e57e9662e1adfc803ec92a18ebec33dac73ec9e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 22 May 2013 18:11:59 -0700 Subject: [PATCH] Remove old Log macros --- src/cpp/ripple/Log.h | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/cpp/ripple/Log.h b/src/cpp/ripple/Log.h index 50c54a6eb2..a9fb0da7c6 100644 --- a/src/cpp/ripple/Log.h +++ b/src/cpp/ripple/Log.h @@ -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 ().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 ()) + +// Write to the log conditionally +// #define CondLog(c, s, k) if (!ShouldLog (s, k) || !(c)) do {} while(0); else Log(s, LogPartition::get ()) #endif