From d5df52414c221c0678c3af4f91b4dd4899b1e0b0 Mon Sep 17 00:00:00 2001 From: zogodo <742782908@qq.com> Date: Tue, 10 Dec 2019 21:38:29 +0800 Subject: [PATCH] web_log --- TC1/http_server/web_log.h | 3 +-- TC1/user_wifi.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TC1/http_server/web_log.h b/TC1/http_server/web_log.h index 0a34090..b7eb5c7 100644 --- a/TC1/http_server/web_log.h +++ b/TC1/http_server/web_log.h @@ -14,9 +14,8 @@ void SetLogRecord(LogRecord* lr, char* log); char* GetLogRecord(int idx); -#define os_log(format, ...) \ +#define web_log(format, ...) \ LOG_TMP = (char*)malloc(sizeof(char)*LOG_LEN); \ snprintf(LOG_TMP, LOG_LEN, format, ##__VA_ARGS__); \ SetLogRecord(&log_record, LOG_TMP); \ - custom_log("WIFI", format, ##__VA_ARGS__) \ diff --git a/TC1/user_wifi.c b/TC1/user_wifi.c index 4c86274..08a09ee 100644 --- a/TC1/user_wifi.c +++ b/TC1/user_wifi.c @@ -7,6 +7,8 @@ #include "mqtt_server/user_function.h" #include "http_server/web_log.h" +#define os_log(format, ...) custom_log("WIFI", format, ##__VA_ARGS__); web_log(format, ##__VA_ARGS__) + char wifi_status = WIFI_STATE_NOCONNECT; mico_timer_t wifi_led_timer;