Go to the documentation of this file.
6 #ifndef SRC_BGP_BGP_DEBUG_H_
7 #define SRC_BGP_BGP_DEBUG_H_
9 #if !defined(__BGP_DEBUG__)
11 #define BGP_DEBUG(...)
22 const char *file,
const char *
function,
int line,
24 static bool Enabled() {
return enable_; }
27 static bool enable_stack_trace_;
39 #define __FUNC__ __FUNCTION__
41 #define BGP_DEBUG(dtable, dpeer, droute, format, args...) \
43 if (!BgpDebug::Enabled()) { \
47 snprintf(msg, sizeof(msg), format, ##args); \
49 BgpDebug::Debug(static_cast<DBTable *>(dtable), \
50 static_cast<DBEntry *>(droute), \
51 static_cast<IPeer *>(dpeer), \
52 __FILE__, __FUNC__, __LINE__, msg); \