#include "arch/Arch.h"
#include "arch/IArchMultithread.h"
#include "common/Common.h"
#include <mutex>
Go to the source code of this file.
◆ BYE
#define BYE "\nTry `%s --help' for more information." |
◆ CLOG
◆ CLOG_CRIT
◆ CLOG_DEBUG
◆ CLOG_DEBUG1
◆ CLOG_DEBUG2
◆ CLOG_DEBUG3
◆ CLOG_DEBUG4
◆ CLOG_DEBUG5
◆ CLOG_ERR
◆ CLOG_INFO
◆ CLOG_NOTE
◆ CLOG_PRINT
◆ CLOG_TRACE
#define CLOG_TRACE __FILE__, __LINE__, |
◆ CLOG_WARN
◆ LOG
Value:
#define CLOG
Definition Log.h:16
Write to the log. Because macros cannot accept variable arguments, this should be invoked like so:
LOG((CLOG_XXX
"%d and %d are %s",
x,
y,
x ==
y ?
"equal" :
"not equal"));
#define LOG(_a1)
Definition Log.h:189
int y
Definition ServerConfig.cpp:27
int x
Definition ServerConfig.cpp:26
In particular, notice the double open and close parentheses. Also note that there is no comma after the CLOG_XXX
. The XXX
should be replaced by one of enumerants in Log::LogLevel
without the leading k
. For example, CLOG_INFO
. The special CLOG_PRINT
level will not be filtered and is never prefixed by the filename and line number.
If NOLOGGING
is defined during the build then this macro expands to nothing. If NDEBUG
is defined during the build then it expands to a call to Log::print. Otherwise it expands to a call to Log::print, which includes the filename and line number.
◆ LOG_CRIT
Value:
#define CLOG_CRIT
Definition Log.h:202
◆ LOG_DEBUG
Value:
#define CLOG_DEBUG
Definition Log.h:207
◆ LOG_DEBUG1
#define LOG_DEBUG1 |
( |
| ... | ) |
|
Value:
#define CLOG_DEBUG1
Definition Log.h:208
◆ LOG_DEBUG2
#define LOG_DEBUG2 |
( |
| ... | ) |
|
Value:
#define CLOG_DEBUG2
Definition Log.h:209
◆ LOG_DEBUG3
#define LOG_DEBUG3 |
( |
| ... | ) |
|
Value:
#define CLOG_DEBUG3
Definition Log.h:210
◆ LOG_DEBUG4
#define LOG_DEBUG4 |
( |
| ... | ) |
|
Value:
#define CLOG_DEBUG4
Definition Log.h:211
◆ LOG_DEBUG5
#define LOG_DEBUG5 |
( |
| ... | ) |
|
Value:
#define CLOG_DEBUG5
Definition Log.h:212
◆ LOG_ERR
Value:
#define CLOG_ERR
Definition Log.h:203
◆ LOG_INFO
Value:
#define CLOG_INFO
Definition Log.h:206
◆ LOG_NOTE
Value:
#define CLOG_NOTE
Definition Log.h:205
◆ LOG_PRINT
Value:
#define CLOG_PRINT
Definition Log.h:201
◆ LOG_WARN
Value:
#define CLOG_WARN
Definition Log.h:204
◆ LOGC
#define LOGC |
( |
| _a1, |
|
|
| _a2 ) |
Value:Write to the log if and only if expr is true. Because macros cannot accept variable arguments, this should be invoked like so:
LOGC(
x ==
y, (CLOG_XXX
"%d and %d are equal",
x,
y));
#define LOGC(_a1, _a2)
Definition Log.h:190
In particular, notice the parentheses around everything after the boolean expression. Also note that there is no comma after the CLOG_XXX
. The XXX
should be replaced by one of enumerants in Log::LogLevel
without the leading k
. For example, CLOG_INFO
. The special CLOG_PRINT
level will not be filtered and is never prefixed by the filename and line number.
If NOLOGGING
is defined during the build then this macro expands to nothing. If NDEBUG
is not defined during the build then it expands to a call to Log::print that prints the filename and line number, otherwise it expands to a call that doesn't.