forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathlogs.h
executable file
·36 lines (22 loc) · 947 Bytes
/
logs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef LOGS_H_INCLUDED
#define LOGS_H_INCLUDED
#include "readconfig.h"
#include "common.h"
#include "iheader.h"
#define PRINTON Log_Inited()
#define DEBUGSECTION if( PRINTON )
int Log_Init(ConfigFileInfo *ConfigInfo, BOOL PrintScreen, BOOL PrintDebug);
BOOL Log_Inited(void);
BOOL Log_DebugOn(void);
void Log_Print(const char *Type, const char *format, ...);
#define WARNING(...) Log_Print("WARN", __VA_ARGS__)
#define INFO(...) Log_Print("INFO", __VA_ARGS__)
#define ERRORMSG(...) Log_Print("ERROR", __VA_ARGS__)
#define DEBUG(...) if( Log_DebugOn() ) \
Log_Print("DEBUG", __VA_ARGS__);
void ShowRefusingMessage(IHeader *h, const char *Message);
void ShowTimeOutMessage(IHeader *h, char Protocol);
void ShowErrorMessage(IHeader *h, char Protocol);
void ShowNormalMessage(IHeader *h, char Protocol);
void ShowBlockedMessage(IHeader *h, const char *Message);
#endif // LOGS_H_INCLUDED