|
PcapPlusPlus
20.08
|
Go to the documentation of this file.
8 #define LOG_MODULE UndefinedLogModule
142 void setErrorString(
char* errString,
int len) { m_ErrorString = errString; m_ErrorStringLen = len; }
178 int m_ErrorStringLen;
179 bool m_SuppressErrors;
184 #define LOG_DEBUG(format, ...) do { \
185 if(pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)) { \
186 printf("[%-35s: %-25s: line:%-4d] " format "\n", __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \
190 #define LOG_ERROR(format, ...) do { \
191 if (!pcpp::LoggerPP::getInstance().isSupressErrors()) {\
192 if(pcpp::LoggerPP::getInstance().isErrorStringSet()) \
193 snprintf(pcpp::LoggerPP::getInstance().getErrorString(), pcpp::LoggerPP::getInstance().getErrorStringLength(), format, ## __VA_ARGS__); \
195 fprintf(stderr, format "\n", ## __VA_ARGS__); \
199 #define IS_DEBUG pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)
@ PacketLogModuleDhcpLayer
DhcpLayer module (Packet++)
Definition: Logger.h:48
@ PcapLogModulePfRingDevice
PfRingDevice module (Pcap++)
Definition: Logger.h:61
@ PacketLogModuleIPv6Layer
IPv6Layer module (Packet++)
Definition: Logger.h:35
@ PacketLogModuleSdpLayer
SdpLayer module (Packet++)
Definition: Logger.h:51
@ PacketLogModuleSllLayer
SllLayer module (Packet++)
Definition: Logger.h:47
@ PacketLogModulePacket
Packet module (Packet++)
Definition: Logger.h:30
@ PacketLogModuleRadiusLayer
RadiusLayer module (Packet++)
Definition: Logger.h:52
void enableErrors()
Definition: Logger.h:158
@ PacketLogModulePayloadLayer
PayloadLayer module (Packet++)
Definition: Logger.h:36
void setErrorString(char *errString, int len)
Definition: Logger.h:142
@ PacketLogModuleVlanLayer
VlanLayer module (Packet++)
Definition: Logger.h:39
LogModule
Definition: Logger.h:23
bool isDebugEnabled(LogModule module) const
Definition: Logger.h:113
@ PcapLogModuleMBufRawPacket
MBufRawPacket module (Pcap++)
Definition: Logger.h:62
@ Debug
Debug log level.
Definition: Logger.h:92
static LoggerPP & getInstance()
Definition: Logger.h:171
@ CommonLogModuleIpUtils
IP Utils module (Common++)
Definition: Logger.h:26
char * getErrorString() const
Definition: Logger.h:134
@ PacketLogModuleIPReassembly
IPReassembly module (Packet++)
Definition: Logger.h:56
void setAllModlesToLogLevel(LogLevel level)
Definition: Logger.h:106
@ Normal
Normal log level.
Definition: Logger.h:91
@ PacketLogModuleIgmpLayer
IgmpLayer module (Packet++)
Definition: Logger.h:49
@ PacketLogModuleHttpLayer
HttpLayer module (Packet++)
Definition: Logger.h:40
bool isErrorStringSet() const
Definition: Logger.h:128
@ PacketLogModuleSipLayer
SipLayer module (Packet++)
Definition: Logger.h:50
@ PcapLogModuleLiveDevice
PcapLiveDevice module (Pcap++)
Definition: Logger.h:59
@ PacketLogModuleGtpLayer
GtpLayer module (Packet++)
Definition: Logger.h:53
@ PacketLogModuleDnsLayer
DnsLayer module (Packet++)
Definition: Logger.h:42
@ PacketLogModuleRawPacket
RawPacket module (Packet++)
Definition: Logger.h:29
@ PacketLogModuleMplsLayer
MplsLayer module (Packet++)
Definition: Logger.h:43
@ PacketLogModuleIPv4Layer
IPv4Layer module (Packet++)
Definition: Logger.h:34
@ PcapLogModuleFileDevice
FileDevice module (Pcap++)
Definition: Logger.h:60
@ PcapLogModuleDpdkDevice
DpdkDevice module (Pcap++)
Definition: Logger.h:63
@ CommonLogModuleGenericUtils
Generic Utils (Common++)
Definition: Logger.h:28
The main namespace for the PcapPlusPlus lib.
@ NetworkUtils
NetworkUtils module (Pcap++)
Definition: Logger.h:65
int getErrorStringLength() const
Definition: Logger.h:148
@ PacketLogModuleSSLLayer
SSLLayer module (Packet++)
Definition: Logger.h:46
const LogLevel * getLogModulesArr() const
Definition: Logger.h:122
@ PcapLogModuleKniDevice
KniDevice module (Pcap++)
Definition: Logger.h:64
@ PacketLogModuleGreLayer
GreLayer module (Packet++)
Definition: Logger.h:45
@ PcapLogModuleRemoteDevice
WinPcapRemoteDevice module (Pcap++)
Definition: Logger.h:58
LogLevel
Definition: Logger.h:89
@ PacketLogModuleTcpLayer
TcpLayer module (Packet++)
Definition: Logger.h:37
void setLogLevel(LogModule module, LogLevel level)
Definition: Logger.h:100
@ PcapLogModuleWinPcapLiveDevice
WinPcapLiveDevice module (Pcap++)
Definition: Logger.h:57
@ PacketLogModuleUdpLayer
UdpLayer module (Packet++)
Definition: Logger.h:38
@ PacketLogModuleBgpLayer
GtpLayer module (Packet++)
Definition: Logger.h:54
@ PacketLogModuleTcpReassembly
TcpReassembly module (Packet++)
Definition: Logger.h:55
@ PacketLogModuleLayer
Layer module (Packet++)
Definition: Logger.h:31
@ PacketLogModulePPPoELayer
PPPoELayer module (Packet++)
Definition: Logger.h:41
void supressErrors()
Definition: Logger.h:153
@ PacketLogModuleArpLayer
ArpLayer module (Packet++)
Definition: Logger.h:32
@ PacketLogModuleEthLayer
EthLayer module (Packet++)
Definition: Logger.h:33
bool isSupressErrors() const
Definition: Logger.h:164
@ CommonLogModuleTablePrinter
Table printer module (Common++)
Definition: Logger.h:27
@ PacketLogModuleIcmpLayer
IcmpLayer module (Packet++)
Definition: Logger.h:44