refactor(logging): remove remote logging subsystem

This commit is contained in:
chenjintao
2026-10-08 16:08:41 +08:00
parent 5d849033c3
commit 3160a33f50
22 changed files with 12 additions and 2546 deletions
@@ -561,41 +561,6 @@ static void handle_prepare_rotate(uint32_t key_version)
cli_write_ok();
}
static void handle_log_command(size_t argc, char *argv[])
{
if (argc < 2 || is_text_empty(argv[1])) {
cli_write_error("missing_log_command");
return;
}
if (strcmp(argv[1], "status") == 0) {
char json[FACTORY_CLI_JSON_MAX_LEN] = {0};
esp_err_t err = control_plane_remote_log_format_status(json, sizeof(json));
if (err != ESP_OK) {
cli_write_error("log_status_failed");
return;
}
cli_write_line(json);
cli_write_ok();
} else if (strcmp(argv[1], "flush") == 0) {
esp_err_t err = control_plane_remote_log_flush_now();
if (err != ESP_OK) {
cli_write_error("log_flush_failed");
return;
}
cli_write_ok();
} else if (strcmp(argv[1], "clear") == 0) {
esp_err_t err = control_plane_remote_log_clear();
if (err != ESP_OK) {
cli_write_error("log_clear_failed");
return;
}
cli_write_ok();
} else {
cli_write_error("unknown_log_command");
}
}
static void handle_lcd_test(void)
{
const domain_expression_request_t request = {
@@ -692,8 +657,6 @@ static void handle_command_line(char *line)
return;
}
handle_prepare_rotate(key_version);
} else if (strcmp(cmd, "log") == 0) {
handle_log_command(argc, argv);
} else if (strcmp(cmd, "lcd_test") == 0) {
handle_lcd_test();
} else {
@@ -67,10 +67,6 @@
#define CONFIG_TQ_LIGHT_STANDBY_WIFI_POWER_SAVE 0
#endif
#ifndef CONFIG_TQ_LIGHT_STANDBY_PAUSE_REMOTE_LOG_UPLOAD
#define CONFIG_TQ_LIGHT_STANDBY_PAUSE_REMOTE_LOG_UPLOAD 0
#endif
#ifndef CONFIG_TQ_LIGHT_STANDBY_BATTERY_INTERVAL_SEC
#define CONFIG_TQ_LIGHT_STANDBY_BATTERY_INTERVAL_SEC 300
#endif
@@ -214,9 +210,6 @@ static void control_plane_light_standby_unlock_transition(void)
static esp_err_t control_plane_light_standby_apply_runtime_policy(bool standby)
{
#if CONFIG_TQ_LIGHT_STANDBY_PAUSE_REMOTE_LOG_UPLOAD
control_plane_remote_log_set_light_standby(standby);
#endif
#if CONFIG_TQ_BATTERY_ENABLE
control_plane_battery_service_set_light_standby(standby);
#endif
@@ -233,9 +226,6 @@ static esp_err_t control_plane_light_standby_apply_runtime_policy(bool standby)
standby ? 1 : 0,
esp_err_to_name(wifi_err));
if (standby) {
#if CONFIG_TQ_LIGHT_STANDBY_PAUSE_REMOTE_LOG_UPLOAD
control_plane_remote_log_set_light_standby(false);
#endif
#if CONFIG_TQ_BATTERY_ENABLE
control_plane_battery_service_set_light_standby(false);
#endif
File diff suppressed because it is too large Load Diff
@@ -36,7 +36,6 @@
#define CONTROL_PLANE_TASK_MONITOR_TASK_STACK_SIZE (1024 * 4)
#define CONTROL_PLANE_TASK_MONITOR_STACK_WARN_BYTES 1024U
#define CONTROL_PLANE_TASK_MONITOR_FULL_REPORT_PERIOD 5U
#define CONTROL_PLANE_REMOTE_LOG_STOP_WAIT_MS 1500
#define CONTROL_PLANE_MODEL_CMD_QUEUE_LEN 4
#define CONTROL_PLANE_MODEL_CMD_RECV_TIMEOUT_MS 200
#define CONTROL_PLANE_TASK_STOP_WAIT_MS 1500
@@ -2750,11 +2749,6 @@ esp_err_t control_plane_start_runtime_workers(void)
ESP_LOGI(TAG, "Local wake startup deferred for OTA HTTPS window");
}
esp_err_t remote_log_err = control_plane_remote_log_start();
if (remote_log_err != ESP_OK && remote_log_err != ESP_ERR_NOT_SUPPORTED) {
ESP_LOGW(TAG, "Remote log start failed: %s", esp_err_to_name(remote_log_err));
}
#if CONFIG_FORTUNE_ENABLE
if (control_plane_get_task_handle(&s_daily_fortune_task) == NULL) {
control_plane_request_fortune_refresh();
@@ -2808,7 +2802,6 @@ void control_plane_stop_event_observer_runtime(void)
control_plane_set_runtime_stop_requested(true);
control_plane_stop_key_input_task();
control_plane_stop_system_event_task();
control_plane_remote_log_stop(CONTROL_PLANE_REMOTE_LOG_STOP_WAIT_MS);
control_plane_set_runtime_stop_requested(false);
}