NCBI C++ ToolKit
Classes | Macros
srv_diag.hpp File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CSrvDiagMsg
 Class used in all diagnostic logging. More...
 

Macros

#define _VERIFY(x)   if (x) {} else SRV_FATAL("assertion failed: " << #x)
 
#define _ASSERT(x)   _VERIFY(x)
 
#define assert(x)   _ASSERT(x)
 
#define SRV_LOG(sev, msg)
 Macro to be used for printing log messages. More...
 
#define SRV_FATAL(msg)
 
#define INFO(msg)   CSrvDiagMsg().StartInfo() << msg
 Macro to be used for printing informational messages. More...
 

Macro Definition Documentation

◆ _ASSERT

#define _ASSERT (   x)    _VERIFY(x)

Definition at line 50 of file srv_diag.hpp.

◆ _VERIFY

#define _VERIFY (   x)    if (x) {} else SRV_FATAL("assertion failed: " << #x)

Definition at line 44 of file srv_diag.hpp.

◆ assert

#define assert (   x)    _ASSERT(x)

Definition at line 58 of file srv_diag.hpp.

◆ INFO

#define INFO (   msg)    CSrvDiagMsg().StartInfo() << msg

Macro to be used for printing informational messages.

Macro usage is as follows: INFO(message << some_param << " more message");

Definition at line 182 of file srv_diag.hpp.

◆ SRV_FATAL

#define SRV_FATAL (   msg)
Value:
do { \
SRV_LOG(Fatal, "Fatal error: " << msg); \
abort(); \
} while (0) \
void Fatal(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1209
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Definition at line 173 of file srv_diag.hpp.

◆ SRV_LOG

#define SRV_LOG (   sev,
  msg 
)
Value:
do { \
if (CSrvDiagMsg::IsSeverityVisible(CSrvDiagMsg::sev)) { \
CSrvDiagMsg().StartSrvLog(CSrvDiagMsg::sev, \
__FILE__, __LINE__, \
<< msg; \
} \
} \
while (0) \
static bool IsSeverityVisible(ESeverity sev)
Checks if given severity level is visible, i.e.
Definition: logging.cpp:903
#define NCBI_CURRENT_FUNCTION
Get current function name.
Definition: ncbidiag.hpp:142

Macro to be used for printing log messages.

Macro usage is as follows: SRV_LOG(Error, message << some_param << " more message");

Definition at line 162 of file srv_diag.hpp.

Modified on Fri Sep 20 14:57:03 2024 by modify_doxy.py rev. 669887