|
3 | 3 |
|
4 | 4 | #pragma once |
5 | 5 |
|
6 | | -#ifdef ASYNCWEBSERVER_LOG_CUSTOM |
| 6 | +#if defined(ASYNCWEBSERVER_LOG_CUSTOM) |
7 | 7 | // The user must provide the following macros in AsyncWebServerLoggingCustom.h: |
8 | 8 | // async_ws_log_e, async_ws_log_w, async_ws_log_i, async_ws_log_d, async_ws_log_v |
9 | 9 | #include <AsyncWebServerLoggingCustom.h> |
10 | 10 |
|
11 | | -#elif defined(ASYNCWEBSERVER_LOG_DEBUG) |
| 11 | +#else // ASYNCWEBSERVER_LOG_CUSTOM |
| 12 | + |
| 13 | +#if defined(ASYNCWEBSERVER_LOG_DEBUG) |
12 | 14 | // Local Debug logging |
13 | 15 | #include <HardwareSerial.h> |
14 | 16 | #define async_ws_log_e(format, ...) Serial.printf("E async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); |
|
17 | 19 | #define async_ws_log_d(format, ...) Serial.printf("D async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); |
18 | 20 | #define async_ws_log_v(format, ...) Serial.printf("V async_ws %s() %d: " format "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); |
19 | 21 |
|
20 | | -#else |
| 22 | +#else // ASYNCWEBSERVER_LOG_DEBUG |
| 23 | + |
21 | 24 | // Framework-based logging |
22 | 25 |
|
23 | 26 | /** |
|
172 | 175 | #define async_ws_log_v(format, ...) ESP_LOGV("async_ws", "%s() %d: " format, __FUNCTION__, __LINE__, ##__VA_ARGS__) |
173 | 176 | #endif // !LIBRETINY && !ARDUINO |
174 | 177 |
|
| 178 | +#endif // ASYNCWEBSERVER_LOG_DEBUG |
175 | 179 | #endif // ASYNCWEBSERVER_LOG_CUSTOM |
0 commit comments