|
11 | 11 | #elif defined(ASYNCWEBSERVER_LOG_DEBUG) |
12 | 12 | // Local Debug logging |
13 | 13 | #include <HardwareSerial.h> |
14 | | -#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
15 | | -#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
16 | | -#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
17 | | -#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
18 | | -#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 14 | +#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
| 15 | +#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
| 16 | +#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
| 17 | +#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
| 18 | +#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
19 | 19 |
|
20 | 20 | #else |
21 | 21 | // Framework-based logging |
|
50 | 50 | #endif |
51 | 51 | // error |
52 | 52 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_ERROR |
53 | | -#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 53 | +#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
54 | 54 | #else |
55 | 55 | #define async_ws_log_e(format, ...) |
56 | 56 | #endif |
57 | 57 | // warn |
58 | 58 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_WARN |
59 | | -#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 59 | +#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
60 | 60 | #else |
61 | 61 | #define async_ws_log_w(format, ...) |
62 | 62 | #endif |
63 | 63 | // info |
64 | 64 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_INFO |
65 | | -#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 65 | +#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
66 | 66 | #else |
67 | 67 | #define async_ws_log_i(format, ...) |
68 | 68 | #endif |
69 | 69 | // debug |
70 | 70 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_DEBUG |
71 | | -#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 71 | +#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
72 | 72 | #else |
73 | 73 | #define async_ws_log_d(format, ...) |
74 | 74 | #endif |
75 | 75 | // verbose |
76 | 76 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_VERBOSE |
77 | | -#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 77 | +#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
78 | 78 | #else |
79 | 79 | #define async_ws_log_v(format, ...) |
80 | 80 | #endif |
|
0 commit comments