disable more debug level 0 messages

This commit is contained in:
Bogdan Pilyugin 2023-12-07 15:55:33 +02:00
parent 580d92f9b5
commit d1a1759f01

View File

@ -167,8 +167,9 @@ static esp_err_t http_resp_dir_html(httpd_req_t *req, const char *dirpath)
continue; continue;
} }
sprintf(entrysize, "%ld", entry_stat.st_size); sprintf(entrysize, "%ld", entry_stat.st_size);
#if FILE_SERVER_DEBUG_LEVEL > 0
ESP_LOGI(TAG, "Found %s : %s (%s bytes)", entrytype, entry->d_name, entrysize); ESP_LOGI(TAG, "Found %s : %s (%s bytes)", entrytype, entry->d_name, entrysize);
#endif
/* Send chunk of HTML file containing table entries with file name and size */ /* Send chunk of HTML file containing table entries with file name and size */
httpd_resp_sendstr_chunk(req, "<tr><td><a href=\""); httpd_resp_sendstr_chunk(req, "<tr><td><a href=\"");
httpd_resp_sendstr_chunk(req, req->uri); httpd_resp_sendstr_chunk(req, req->uri);
@ -257,8 +258,9 @@ esp_err_t download_get_handler(httpd_req_t *req)
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read existing file"); httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read existing file");
return ESP_FAIL; return ESP_FAIL;
} }
#if FILE_SERVER_DEBUG_LEVEL > 0
ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size); ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size);
#endif
set_content_type_from_file(req, filename); set_content_type_from_file(req, filename);
/* Retrieve the pointer to scratch buffer for temporary storage */ /* Retrieve the pointer to scratch buffer for temporary storage */