8 #define LOG_MODULE UndefinedLogModule 136 void setErrorString(
char* errString,
int len) { m_ErrorString = errString; m_ErrorStringLen = len; }
172 int m_ErrorStringLen;
173 bool m_SuppressErrors;
178 #define LOG_DEBUG(format, ...) do { \ 179 if(pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE)) { \ 180 printf("[%-35s: %-25s: line:%-4d] " format "\n", __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ 184 #define LOG_ERROR(format, ...) do { \ 185 if (!pcpp::LoggerPP::getInstance().isSupressErrors()) {\ 186 if(pcpp::LoggerPP::getInstance().isErrorStringSet()) \ 187 snprintf(pcpp::LoggerPP::getInstance().getErrorString(), pcpp::LoggerPP::getInstance().getErrorStringLength(), format "\n", ## __VA_ARGS__); \ 189 fprintf(stderr, format "\n", ## __VA_ARGS__); \ 193 #define IS_DEBUG pcpp::LoggerPP::getInstance().isDebugEnabled(LOG_MODULE) WinPcapRemoteDevice module (Pcap++)
Definition: Logger.h:54
PayloadLayer module (Packet++)
Definition: Logger.h:35
bool isErrorStringSet()
Definition: Logger.h:122
DhcpLayer module (Packet++)
Definition: Logger.h:47
SllLayer module (Packet++)
Definition: Logger.h:46
void setErrorString(char *errString, int len)
Definition: Logger.h:136
SSLLayer module (Packet++)
Definition: Logger.h:45
Layer module (Packet++)
Definition: Logger.h:30
PcapLiveDevice module (Pcap++)
Definition: Logger.h:55
IP Utils module (Common++)
Definition: Logger.h:26
IcmpLayer module (Packet++)
Definition: Logger.h:43
IgmpLayer module (Packet++)
Definition: Logger.h:48
PfRingDevice module (Pcap++)
Definition: Logger.h:57
The main namespace for the PcapPlusPlus lib.
void setLogLevel(LogModule module, LogLevel level)
Definition: Logger.h:94
DnsLayer module (Packet++)
Definition: Logger.h:41
PPPoELayer module (Packet++)
Definition: Logger.h:40
bool isSupressErrors()
Definition: Logger.h:158
TcpReassembly module (Packet++)
Definition: Logger.h:51
LogModule
Definition: Logger.h:23
Table printer module (Common++)
Definition: Logger.h:27
IPReassembly module (Packet++)
Definition: Logger.h:52
Debug log level.
Definition: Logger.h:86
void setAllModlesToLogLevel(LogLevel level)
Definition: Logger.h:100
TcpLayer module (Packet++)
Definition: Logger.h:36
VlanLayer module (Packet++)
Definition: Logger.h:38
Normal log level.
Definition: Logger.h:85
MplsLayer module (Packet++)
Definition: Logger.h:42
LogLevel
Definition: Logger.h:83
GreLayer module (Packet++)
Definition: Logger.h:44
void supressErrors()
Definition: Logger.h:147
RawPacket module (Packet++)
Definition: Logger.h:28
UdpLayer module (Packet++)
Definition: Logger.h:37
Packet module (Packet++)
Definition: Logger.h:29
HttpLayer module (Packet++)
Definition: Logger.h:39
IPv4Layer module (Packet++)
Definition: Logger.h:33
ArpLayer module (Packet++)
Definition: Logger.h:31
DpdkDevice module (Pcap++)
Definition: Logger.h:58
bool isDebugEnabled(LogModule module)
Definition: Logger.h:107
EthLayer module (Packet++)
Definition: Logger.h:32
void enableErrors()
Definition: Logger.h:152
FileDevice module (Pcap++)
Definition: Logger.h:56
SipLayer module (Packet++)
Definition: Logger.h:49
NetworkUtils module (Pcap++)
Definition: Logger.h:59
WinPcapLiveDevice module (Pcap++)
Definition: Logger.h:53
SdpLayer module (Packet++)
Definition: Logger.h:50
IPv6Layer module (Packet++)
Definition: Logger.h:34
char * getErrorString()
Definition: Logger.h:128
int getErrorStringLength()
Definition: Logger.h:142
LogLevel * getLogModulesArr()
Definition: Logger.h:116
static LoggerPP & getInstance()
Definition: Logger.h:165