|
147 | 147 |
|
148 | 148 | # else |
149 | 149 | # include "nimble/console/console.h" |
| 150 | +# include "esp32-hal.h" |
150 | 151 |
|
151 | 152 | # if MYNEWT_VAL(NIMBLE_CPP_LOG_LEVEL) >= 4 |
152 | | -# define NIMBLE_LOGD(tag, format, ...) console_printf("D %s: " format "\n", tag, ##__VA_ARGS__) |
| 153 | +# define NIMBLE_LOGD(tag, format, ...) console_printf("D (%lu) %s: " format "\n", millis(), tag, ##__VA_ARGS__) |
153 | 154 | # else |
154 | 155 | # define NIMBLE_LOGD(tag, format, ...) (void)tag |
155 | 156 | # endif |
156 | 157 |
|
157 | 158 | # if MYNEWT_VAL(NIMBLE_CPP_LOG_LEVEL) >= 3 |
158 | | -# define NIMBLE_LOGI(tag, format, ...) console_printf("I %s: " format "\n", tag, ##__VA_ARGS__) |
| 159 | +# define NIMBLE_LOGI(tag, format, ...) console_printf("I (%lu) %s: " format "\n", millis(), tag, ##__VA_ARGS__) |
159 | 160 | # else |
160 | 161 | # define NIMBLE_LOGI(tag, format, ...) (void)tag |
161 | 162 | # endif |
162 | 163 |
|
163 | 164 | # if MYNEWT_VAL(NIMBLE_CPP_LOG_LEVEL) >= 2 |
164 | | -# define NIMBLE_LOGW(tag, format, ...) console_printf("W %s: " format "\n", tag, ##__VA_ARGS__) |
| 165 | +# define NIMBLE_LOGW(tag, format, ...) console_printf("W (%lu) %s: " format "\n", millis(), tag, ##__VA_ARGS__) |
165 | 166 | # else |
166 | 167 | # define NIMBLE_LOGW(tag, format, ...) (void)tag |
167 | 168 | # endif |
168 | 169 |
|
169 | 170 | # if MYNEWT_VAL(NIMBLE_CPP_LOG_LEVEL) >= 1 |
170 | | -# define NIMBLE_LOGE(tag, format, ...) console_printf("E %s: " format "\n", tag, ##__VA_ARGS__) |
| 171 | +# define NIMBLE_LOGE(tag, format, ...) console_printf("E (%lu) %s: " format "\n", millis(), tag, ##__VA_ARGS__) |
171 | 172 | # else |
172 | 173 | # define NIMBLE_LOGE(tag, format, ...) (void)tag |
173 | 174 | # endif |
|
0 commit comments