blob: 397ce2bb67eab2409e7acf4ea2d9b10242517ba1 (
plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#define LOG_SOH "\001"
#define LOG_SOH_ASCII '\001'
#define EMERG_LOGLEVEL 0
#define ALERT_LOGLEVEL 1
#define CRIT_LOGLEVEL 2
#define ERR_LOGLEVEL 3
#define WARNING_LOGLEVEL 4
#define NOTICE_LOGLEVEL 5
#define INFO_LOGLEVEL 6
#define DEBUG_LOGLEVEL 7
#define DEFAULT_LOGLEVEL NOTICE_LOGLEVEL
#define CONSOLE_LOGLEVEL DEBUG_LOGLEVEL
#define LOG_EMERG LOG_SOH "0"
#define LOG_ALERT LOG_SOH "1"
#define LOG_CRIT LOG_SOH "2"
#define LOG_ERR LOG_SOH "3"
#define LOG_WARNING LOG_SOH "4"
#define LOG_NOTICE LOG_SOH "5"
#define LOG_INFO LOG_SOH "6"
#define LOG_DEBUG LOG_SOH "7"
#define LOG_DEFAULT ""
int print(const char *fmt, ...);
#define ANSI_CSI "\x1b["
#define ANSI_BOLD ANSI_CSI "1m"
#define ANSI_ITALIC ANSI_CSI "3m"
#define ANSI_BLINK ANSI_CSI "5m"
#define ANSI_REVERSE ANSI_CSI "7m"
#define ANSI_RESET ANSI_CSI "0m"
#define ANSI_BLACK ANSI_CSI "30m"
#define ANSI_RED ANSI_CSI "31m"
#define ANSI_GREEN ANSI_CSI "32m"
#define ANSI_YELLOW ANSI_CSI "33m"
#define ANSI_BLUE ANSI_CSI "34m"
#define ANSI_MAGENTA ANSI_CSI "35m"
#define ANSI_CYAN ANSI_CSI "36m"
#define ANSI_WHITE ANSI_CSI "37m"
#define ANSI_BRIGHT_BLACK ANSI_CSI "90m"
#define ANSI_BRIGHT_RED ANSI_CSI "91m"
#define ANSI_BRIGHT_GREEN ANSI_CSI "92m"
#define ANSI_BRIGHT_YELLOW ANSI_CSI "93m"
#define ANSI_BRIGHT_BLUE ANSI_CSI "94m"
#define ANSI_BRIGHT_MAGENTA ANSI_CSI "95m"
#define ANSI_BRIGHT_CYAN ANSI_CSI "96m"
#define ANSI_BRIGHT_WHITE ANSI_CSI "97m"
|