forked from hhool/webrtc-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hal_trace.h
37 lines (28 loc) · 1.32 KB
/
hal_trace.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
#include <stdio.h>
#include <stdlib.h>
#define TRACE( fmt, arg ... ) \
do{printf("[DEBUG] " fmt , ##arg ); }while(0);
#define DEBUG2( fmt, arg ... ) \
do{printf("[%s: %s: line %d]" fmt ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor1( fmt, arg ... ) \
do{printf("\033[30m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor2( fmt, arg ... ) \
do{printf("\033[31m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor3( fmt, arg ... ) \
do{printf("\033[32m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor4( fmt, arg ... ) \
do{printf("\033[33m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor5( fmt, arg ... ) \
do{printf("\033[34m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor6( fmt, arg ... ) \
do{printf("\033[35m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);
#define PrintColor7( fmt, arg ... ) \
do{printf("\033[36m""[%s: %s: line %d]" fmt"\033[0m" ,\
__FILE__, __FUNCTION__, __LINE__, ##arg ); }while(0);