@@ -88,7 +88,7 @@ int log_printf(const char *fmt, ...);
88
88
#define log_v (format , ...) log_printf(ARDUHAL_LOG_FORMAT(V, format), ##__VA_ARGS__)
89
89
#define isr_log_v (format , ...) ets_printf(ARDUHAL_LOG_FORMAT(V, format), ##__VA_ARGS__)
90
90
#else
91
- #define log_v (format , ...) do {log_to_esp(TAG, ESP_LOG_VERBOSE , format, ##__VA_ARGS__);}while(0)
91
+ #define log_v (format , ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_VERBOSE, TAG , format, ##__VA_ARGS__);}while(0)
92
92
#define isr_log_v (format , ...) do {ets_printf(LOG_FORMAT(V, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
93
93
#endif
94
94
#else
@@ -101,7 +101,7 @@ int log_printf(const char *fmt, ...);
101
101
#define log_d (format , ...) log_printf(ARDUHAL_LOG_FORMAT(D, format), ##__VA_ARGS__)
102
102
#define isr_log_d (format , ...) ets_printf(ARDUHAL_LOG_FORMAT(D, format), ##__VA_ARGS__)
103
103
#else
104
- #define log_d (format , ...) do {log_to_esp(TAG, ESP_LOG_DEBUG , format, ##__VA_ARGS__);}while(0)
104
+ #define log_d (format , ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, TAG , format, ##__VA_ARGS__);}while(0)
105
105
#define isr_log_d (format , ...) do {ets_printf(LOG_FORMAT(D, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
106
106
#endif
107
107
#else
@@ -114,7 +114,7 @@ int log_printf(const char *fmt, ...);
114
114
#define log_i (format , ...) log_printf(ARDUHAL_LOG_FORMAT(I, format), ##__VA_ARGS__)
115
115
#define isr_log_i (format , ...) ets_printf(ARDUHAL_LOG_FORMAT(I, format), ##__VA_ARGS__)
116
116
#else
117
- #define log_i (format , ...) do {log_to_esp(TAG, ESP_LOG_INFO , format, ##__VA_ARGS__);}while(0)
117
+ #define log_i (format , ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, TAG , format, ##__VA_ARGS__);}while(0)
118
118
#define isr_log_i (format , ...) do {ets_printf(LOG_FORMAT(I, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
119
119
#endif
120
120
#else
@@ -127,7 +127,7 @@ int log_printf(const char *fmt, ...);
127
127
#define log_w (format , ...) log_printf(ARDUHAL_LOG_FORMAT(W, format), ##__VA_ARGS__)
128
128
#define isr_log_w (format , ...) ets_printf(ARDUHAL_LOG_FORMAT(W, format), ##__VA_ARGS__)
129
129
#else
130
- #define log_w (format , ...) do {log_to_esp(TAG, ESP_LOG_WARN , format, ##__VA_ARGS__);}while(0)
130
+ #define log_w (format , ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, TAG , format, ##__VA_ARGS__);}while(0)
131
131
#define isr_log_w (format , ...) do {ets_printf(LOG_FORMAT(W, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
132
132
#endif
133
133
#else
@@ -153,7 +153,7 @@ int log_printf(const char *fmt, ...);
153
153
#define log_n (format , ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
154
154
#define isr_log_n (format , ...) ets_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
155
155
#else
156
- #define log_n (format , ...) do {log_to_esp(TAG, ESP_LOG_ERROR , format, ##__VA_ARGS__);}while(0)
156
+ #define log_n (format , ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, TAG , format, ##__VA_ARGS__);}while(0)
157
157
#define isr_log_n (format , ...) do {ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
158
158
#endif
159
159
#else
@@ -167,7 +167,6 @@ int log_printf(const char *fmt, ...);
167
167
#ifndef TAG
168
168
#define TAG "ARDUINO"
169
169
#endif
170
- void log_to_esp (char * tag , esp_log_level_t level , const char * format , ...);
171
170
//#define log_n(format, ...) myLog(ESP_LOG_NONE, format, ##__VA_ARGS__)
172
171
#else
173
172
#ifdef CONFIG_ARDUHAL_ESP_LOG
0 commit comments