8 #define LOG_MODULE UndefinedLogModule 138 void setErrorString(
char* errString,
int len) { m_ErrorString = errString; m_ErrorStringLen = len; }
174 int m_ErrorStringLen;
175 bool m_SuppressErrors;
180 #define LOG_DEBUG(format, ...) do { \ 181 if(pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)) { \ 182 printf("[%-35s: %-25s: line:%-4d] " format "\n", __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ 186 #define LOG_ERROR(format, ...) do { \ 187 if (!pcpp::LoggerPP::getInstance().isSupressErrors()) {\ 188 if(pcpp::LoggerPP::getInstance().isErrorStringSet()) \ 189 snprintf(pcpp::LoggerPP::getInstance().getErrorString(), pcpp::LoggerPP::getInstance().getErrorStringLength(), format "\n", ## __VA_ARGS__); \ 191 fprintf(stderr, format "\n", ## __VA_ARGS__); \ 195 #define IS_DEBUG pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE) WinPcapRemoteDevice module (Pcap++)
Definition: Logger.h:56
SllLayer module (Packet++)
Definition: Logger.h:47
WinPcapLiveDevice module (Pcap++)
Definition: Logger.h:55
RawPacket module (Packet++)
Definition: Logger.h:29
LogLevel
Definition: Logger.h:85
MplsLayer module (Packet++)
Definition: Logger.h:43
IPReassembly module (Packet++)
Definition: Logger.h:54
bool isErrorStringSet()
Definition: Logger.h:124
void setAllModlesToLogLevel(LogLevel level)
Definition: Logger.h:102
TcpReassembly module (Packet++)
Definition: Logger.h:53
PPPoELayer module (Packet++)
Definition: Logger.h:41
IgmpLayer module (Packet++)
Definition: Logger.h:49
IPv4Layer module (Packet++)
Definition: Logger.h:34
SipLayer module (Packet++)
Definition: Logger.h:50
PfRingDevice module (Pcap++)
Definition: Logger.h:59
HttpLayer module (Packet++)
Definition: Logger.h:40
IP Utils module (Common++)
Definition: Logger.h:26
bool isDebugEnabled(LogModule module)
Definition: Logger.h:109
UdpLayer module (Packet++)
Definition: Logger.h:38
ArpLayer module (Packet++)
Definition: Logger.h:32
Packet module (Packet++)
Definition: Logger.h:30
TcpLayer module (Packet++)
Definition: Logger.h:37
Normal log level.
Definition: Logger.h:87
GreLayer module (Packet++)
Definition: Logger.h:45
void enableErrors()
Definition: Logger.h:154
EthLayer module (Packet++)
Definition: Logger.h:33
Table printer module (Common++)
Definition: Logger.h:27
Debug log level.
Definition: Logger.h:88
PcapLiveDevice module (Pcap++)
Definition: Logger.h:57
DhcpLayer module (Packet++)
Definition: Logger.h:48
VlanLayer module (Packet++)
Definition: Logger.h:39
PayloadLayer module (Packet++)
Definition: Logger.h:36
FileDevice module (Pcap++)
Definition: Logger.h:58
DnsLayer module (Packet++)
Definition: Logger.h:42
IcmpLayer module (Packet++)
Definition: Logger.h:44
LogLevel * getLogModulesArr()
Definition: Logger.h:118
IPv6Layer module (Packet++)
Definition: Logger.h:35
void setErrorString(char *errString, int len)
Definition: Logger.h:138
RadiusLayer module (Packet++)
Definition: Logger.h:52
DpdkDevice module (Pcap++)
Definition: Logger.h:60
Layer module (Packet++)
Definition: Logger.h:31
Generic Utils (Common++)
Definition: Logger.h:28
void setLogLevel(LogModule module, LogLevel level)
Definition: Logger.h:96
void supressErrors()
Definition: Logger.h:149
int getErrorStringLength()
Definition: Logger.h:144
static LoggerPP & getInstance()
Definition: Logger.h:167
NetworkUtils module (Pcap++)
Definition: Logger.h:61
The main namespace for the PcapPlusPlus lib.
bool isSupressErrors()
Definition: Logger.h:160
char * getErrorString()
Definition: Logger.h:130
SdpLayer module (Packet++)
Definition: Logger.h:51
LogModule
Definition: Logger.h:23
SSLLayer module (Packet++)
Definition: Logger.h:46