5 #ifndef __IFMAP_LOG_H__
6 #define __IFMAP_LOG_H__
8 #include "sandesh/sandesh_trace.h"
9 #include "sandesh/common/vns_types.h"
10 #include "sandesh/common/vns_constants.h"
18 #define IFMAP_DEBUG_LOG(obj, category, ...) \
20 if (!LoggingDisabled()) { \
21 obj::Send(g_vns_constants.CategoryNames.find(category)->second, \
22 SandeshLevel::SYS_DEBUG, __FILE__, __LINE__, ##__VA_ARGS__); \
26 #define IFMAP_TRACE(obj, ...) \
28 if (!LoggingDisabled()) { \
29 obj::TraceMsg(IFMapTraceBuf, __FILE__, __LINE__, __VA_ARGS__); \
33 #define IFMAP_DEBUG(obj, ...) \
35 IFMAP_DEBUG_LOG(obj, Category::IFMAP, __VA_ARGS__); \
36 IFMAP_TRACE(obj##Trace, __VA_ARGS__); \
39 #define IFMAP_DEBUG_ONLY(obj, ...) \
41 IFMAP_DEBUG_LOG(obj, Category::IFMAP, __VA_ARGS__); \
44 #define IFMAP_XMPP_TRACE(obj, ...) \
46 if (!LoggingDisabled()) { \
47 obj::TraceMsg(IFMapXmppTraceBuf, __FILE__, __LINE__, __VA_ARGS__); \
51 #define IFMAP_XMPP_DEBUG(obj, ...) \
53 IFMAP_DEBUG_LOG(obj, Category::IFMAP_XMPP, __VA_ARGS__); \
54 IFMAP_XMPP_TRACE(obj##Trace, __VA_ARGS__); \
57 #define IFMAP_UPD_SENDER_TRACE(obj, ...) \
59 if (!LoggingDisabled()) { \
60 obj::TraceMsg(IFMapUpdateSenderBuf, __FILE__, __LINE__, __VA_ARGS__); \
64 #define IFMAP_WARN_LOG(obj, category, ...) \
66 if (!LoggingDisabled()) { \
67 obj::Send(g_vns_constants.CategoryNames.find(category)->second, \
68 SandeshLevel::SYS_WARN, __FILE__, __LINE__, ##__VA_ARGS__); \
72 #define IFMAP_WARN(obj, ...) \
74 IFMAP_WARN_LOG(obj, Category::IFMAP, __VA_ARGS__); \
75 IFMAP_TRACE(obj##Trace, __VA_ARGS__); \
78 #define IFMAP_XMPP_WARN(obj, ...) \
80 IFMAP_WARN_LOG(obj, Category::IFMAP_XMPP, __VA_ARGS__); \
81 IFMAP_XMPP_TRACE(obj##Trace, __VA_ARGS__); \
84 #endif // __IFMAP_LOG_H__
SandeshTraceBufferPtr IFMapUpdateSenderBuf
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
SandeshTraceBufferPtr IFMapTraceBuf
SandeshTraceBufferPtr IFMapXmppTraceBuf