From 750828fedf5a144150a101a81e817d9ba0d9720b Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 21 Feb 2026 18:55:20 -0500 Subject: [PATCH 1/2] Apply suggested fix to src/web/api_handlers_system_logs.c from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/web/api_handlers_system_logs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/api_handlers_system_logs.c b/src/web/api_handlers_system_logs.c index 9c3406f0..967936f0 100644 --- a/src/web/api_handlers_system_logs.c +++ b/src/web/api_handlers_system_logs.c @@ -397,8 +397,8 @@ void handle_get_system_logs(const http_request_t *req, http_response_t *res) { cJSON *message_json = cJSON_GetObjectItem(log_json, "message"); const char *timestamp = timestamp_json && cJSON_IsString(timestamp_json) ? timestamp_json->valuestring : "Unknown"; - const char *log_level = level_json && cJSON_IsString(level_json) ? level_json->valuestring : "info"; - const char *message = message_json && cJSON_IsString(message_json) ? message_json->valuestring : ""; + const char *log_level = level_json && cJSON_IsString(level_json) ? level_json->valuestring : "Unknown"; + const char *message = message_json && cJSON_IsString(message_json) ? message_json->valuestring : "Unknown"; // Check if this log meets the minimum level if (log_level_meets_minimum(log_level, level)) { From e4118e5b3e3d15faeb157d49823b0381df7bea39 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 21 Feb 2026 18:55:21 -0500 Subject: [PATCH 2/2] Apply suggested fix to src/web/api_handlers_system_logs.c from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/web/api_handlers_system_logs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/web/api_handlers_system_logs.c b/src/web/api_handlers_system_logs.c index 967936f0..05bef6c1 100644 --- a/src/web/api_handlers_system_logs.c +++ b/src/web/api_handlers_system_logs.c @@ -327,10 +327,8 @@ void handle_get_system_logs(const http_request_t *req, http_response_t *res) { // Get system logs char **logs = NULL; - // max_log_count is the input (maximum number of logs requested) // actual_log_count is the output (actual number of logs returned) by get_json_logs_tail(). - int max_log_count = DEFAULT_MAX_LOG_ENTRIES; // Input: maximum number of logs to return - int actual_log_count = max_log_count; // Will be updated by get_json_logs_tail() + int actual_log_count = 0; // Will be updated by get_json_logs_tail() // Second argument is the optional source/filter/context; NULL means "no specific filter" (use default system logs) // Note: actual_log_count is updated by get_json_logs_tail() to the actual number of logs returned.