-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlog.h
More file actions
26 lines (21 loc) · 714 Bytes
/
log.h
File metadata and controls
26 lines (21 loc) · 714 Bytes
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
#pragma once
#define _DEBUG(msg...) do \
{ \
printf("[ %s, %s, %04d ] ",__FILE__, __FUNCTION__, __LINE__); \
printf(msg); \
printf("\r\n"); \
} while(0)
#define _ERROR(msg...) do \
{ \
printf("[ ERROR: %s, %04d] ", __FILE__, __LINE__); \
printf(msg); \
printf("\r\n"); \
} while(0)
#define _ASSERT(exp) do \
{ \
if (!(exp)) {\
printf( "[ %s ] ",#exp);printf("\r\n");\
assert(exp);\
}\
} while (0)
#define sys_log _DEBUG