forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 9
/
logs.h
executable file
·38 lines (23 loc) · 1.02 KB
/
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
37
38
#ifndef LOGS_H_INCLUDED
#define LOGS_H_INCLUDED
#include "readconfig.h"
#include "common.h"
#include "iheader.h"
#define PRINTON Log_Inited()
#define DEBUGSECTION if( Log_DebugOn() )
int Log_Init(ConfigFileInfo *ConfigInfo, BOOL PrintScreen, BOOL Debug);
BOOL Log_Inited(void);
BOOL Log_DebugOn(void);
void Log_Print(const char *Type, const char *format, ...);
#define ERRORMSG(...) Log_Print("ERROR", __VA_ARGS__)
#define WARNING(...) Log_Print("WARN", __VA_ARGS__)
#define INFO(...) Log_Print("INFO", __VA_ARGS__)
#define DEBUG(...) DEBUGSECTION \
Log_Print("DEBUG", __VA_ARGS__);
void ShowRefusingMessage(IHeader *h, const char *Message);
void ShowTimeOutMessage(const IHeader *h, char Protocol);
void ShowErrorMessage(IHeader *h, char Protocol);
void ShowNormalMessage(IHeader *h, char Protocol);
void ShowBlockedMessage(IHeader *h, const char *Message);
void ShowSocketError(const char *Prompts, int ErrorNum);
#endif /* LOGS_H_INCLUDED */