Go to the documentation of this file.
5 #ifndef SRC_BGP_BGP_DEBUG_H_
6 #define SRC_BGP_BGP_DEBUG_H_
8 #if !defined(__BGP_DEBUG__)
10 #define BGP_DEBUG(...)
21 const char *file,
const char *
function,
int line,
23 static bool Enabled() {
return enable_; }
26 static bool enable_stack_trace_;
38 #define __FUNC__ __FUNCTION__
40 #define BGP_DEBUG(dtable, dpeer, droute, format, args...) \
42 if (!BgpDebug::Enabled()) { \
46 snprintf(msg, sizeof(msg), format, ##args); \
48 BgpDebug::Debug(static_cast<DBTable *>(dtable), \
49 static_cast<DBEntry *>(droute), \
50 static_cast<IPeer *>(dpeer), \
51 __FILE__, __FUNC__, __LINE__, msg); \
54 #endif // __BGP_DEBUG__
56 #endif // SRC_BGP_BGP_DEBUG_H_