Remove old Log macros

This commit is contained in:
Vinnie Falco
2013-05-22 18:11:59 -07:00
parent c8e601b979
commit 8e57e9662e

View File

@@ -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