|
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 |
|
107 | 107 | #endif |
108 | 108 | // error |
109 | 109 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_ERROR |
110 | | -#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 110 | +#define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
111 | 111 | #else |
112 | 112 | #define async_ws_log_e(format, ...) |
113 | 113 | #endif |
114 | 114 | // warn |
115 | 115 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_WARN |
116 | | -#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 116 | +#define async_ws_log_w(format, ...) Serial.printf("W async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
117 | 117 | #else |
118 | 118 | #define async_ws_log_w(format, ...) |
119 | 119 | #endif |
120 | 120 | // info |
121 | 121 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_INFO |
122 | | -#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 122 | +#define async_ws_log_i(format, ...) Serial.printf("I async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
123 | 123 | #else |
124 | 124 | #define async_ws_log_i(format, ...) |
125 | 125 | #endif |
126 | 126 | // debug |
127 | 127 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_DEBUG |
128 | | -#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 128 | +#define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
129 | 129 | #else |
130 | 130 | #define async_ws_log_d(format, ...) |
131 | 131 | #endif |
132 | 132 | // verbose |
133 | 133 | #if ASYNCWEBSERVER_LOG_LEVEL >= ASYNC_WS_LOG_VERBOSE |
134 | | -#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
| 134 | +#define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) |
135 | 135 | #else |
136 | 136 | #define async_ws_log_v(format, ...) |
137 | 137 | #endif |
|
0 commit comments