|
PcapPlusPlus
19.12
|
Go to the documentation of this file.
8 #define LOG_MODULE UndefinedLogModule
141 void setErrorString(
char* errString,
int len) { m_ErrorString = errString; m_ErrorStringLen = len; }
177 int m_ErrorStringLen;
178 bool m_SuppressErrors;
183 #define LOG_DEBUG(format, ...) do { \
184 if(pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)) { \
185 printf("[%-35s: %-25s: line:%-4d] " format "\n", __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \
189 #define LOG_ERROR(format, ...) do { \
190 if (!pcpp::LoggerPP::getInstance().isSupressErrors()) {\
191 if(pcpp::LoggerPP::getInstance().isErrorStringSet()) \
192 snprintf(pcpp::LoggerPP::getInstance().getErrorString(), pcpp::LoggerPP::getInstance().getErrorStringLength(), format "\n", ## __VA_ARGS__); \
194 fprintf(stderr, format "\n", ## __VA_ARGS__); \
198 #define IS_DEBUG pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)
DhcpLayer module (Packet++)
Definition: Logger.h:48
PfRingDevice module (Pcap++)
Definition: Logger.h:60
IPv6Layer module (Packet++)
Definition: Logger.h:35
SdpLayer module (Packet++)
Definition: Logger.h:51
SllLayer module (Packet++)
Definition: Logger.h:47
Packet module (Packet++)
Definition: Logger.h:30
RadiusLayer module (Packet++)
Definition: Logger.h:52
void enableErrors()
Definition: Logger.h:157
PayloadLayer module (Packet++)
Definition: Logger.h:36
void setErrorString(char *errString, int len)
Definition: Logger.h:141
VlanLayer module (Packet++)
Definition: Logger.h:39
LogModule
Definition: Logger.h:23
bool isDebugEnabled(LogModule module) const
Definition: Logger.h:112
MBufRawPacket module (Pcap++)
Definition: Logger.h:61
Debug log level.
Definition: Logger.h:91
static LoggerPP & getInstance()
Definition: Logger.h:170
IP Utils module (Common++)
Definition: Logger.h:26
char * getErrorString() const
Definition: Logger.h:133
IPReassembly module (Packet++)
Definition: Logger.h:55
void setAllModlesToLogLevel(LogLevel level)
Definition: Logger.h:105
Normal log level.
Definition: Logger.h:90
IgmpLayer module (Packet++)
Definition: Logger.h:49
HttpLayer module (Packet++)
Definition: Logger.h:40
bool isErrorStringSet() const
Definition: Logger.h:127
SipLayer module (Packet++)
Definition: Logger.h:50
PcapLiveDevice module (Pcap++)
Definition: Logger.h:58
GtpLayer module (Packet++)
Definition: Logger.h:53
DnsLayer module (Packet++)
Definition: Logger.h:42
RawPacket module (Packet++)
Definition: Logger.h:29
MplsLayer module (Packet++)
Definition: Logger.h:43
IPv4Layer module (Packet++)
Definition: Logger.h:34
FileDevice module (Pcap++)
Definition: Logger.h:59
DpdkDevice module (Pcap++)
Definition: Logger.h:62
Generic Utils (Common++)
Definition: Logger.h:28
The main namespace for the PcapPlusPlus lib.
NetworkUtils module (Pcap++)
Definition: Logger.h:64
int getErrorStringLength() const
Definition: Logger.h:147
SSLLayer module (Packet++)
Definition: Logger.h:46
const LogLevel * getLogModulesArr() const
Definition: Logger.h:121
KniDevice module (Pcap++)
Definition: Logger.h:63
GreLayer module (Packet++)
Definition: Logger.h:45
WinPcapRemoteDevice module (Pcap++)
Definition: Logger.h:57
LogLevel
Definition: Logger.h:88
TcpLayer module (Packet++)
Definition: Logger.h:37
void setLogLevel(LogModule module, LogLevel level)
Definition: Logger.h:99
WinPcapLiveDevice module (Pcap++)
Definition: Logger.h:56
UdpLayer module (Packet++)
Definition: Logger.h:38
TcpReassembly module (Packet++)
Definition: Logger.h:54
Layer module (Packet++)
Definition: Logger.h:31
PPPoELayer module (Packet++)
Definition: Logger.h:41
void supressErrors()
Definition: Logger.h:152
ArpLayer module (Packet++)
Definition: Logger.h:32
EthLayer module (Packet++)
Definition: Logger.h:33
bool isSupressErrors() const
Definition: Logger.h:163
Table printer module (Common++)
Definition: Logger.h:27
IcmpLayer module (Packet++)
Definition: Logger.h:44