远程日志系统基本运行成功

This commit is contained in:
CSBOOK\44744
2026-06-27 22:12:28 +08:00
parent caa4a7eded
commit 87ba891a8d
12 changed files with 1058 additions and 7 deletions
+82
View File
@@ -132,6 +132,88 @@ menu "Example Configuration"
help
Stack size in bytes for the control-plane system event task.
menu "Remote Logging"
config TQ_REMOTE_LOG_ENABLE
bool "Enable remote log upload"
default n
help
Capture ESP-IDF logs, persist them to the LittleFS-backed
queue, and upload batches to the configured HTTPS server.
config TQ_REMOTE_LOG_ENDPOINT
string "Remote log endpoint URL"
default "https://gz.api.talkingq.com/log/batch"
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_AUTH_TOKEN
string "Remote log bearer token"
default ""
depends on TQ_REMOTE_LOG_ENABLE
help
Optional bearer token sent as Authorization: Bearer
<token>. Leave empty for unauthenticated test receivers.
config TQ_REMOTE_LOG_MIN_LEVEL
int "Minimum remote log level"
default 2
range 0 4
depends on TQ_REMOTE_LOG_ENABLE
help
0=NONE, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG.
config TQ_REMOTE_LOG_PRESERVE_LOCAL_OUTPUT
bool "Preserve existing local log output"
default y
depends on TQ_REMOTE_LOG_ENABLE
help
Keep the original ESP-IDF vprintf output while also
enqueueing logs for server upload.
config TQ_REMOTE_LOG_QUEUE_LEN
int "Remote log memory queue length"
default 128
range 16 512
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_ENTRY_MAX_BYTES
int "Remote log entry max bytes"
default 256
range 128 1024
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_BATCH_MAX_ENTRIES
int "Remote log batch max entries"
default 30
range 5 100
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_FLUSH_INTERVAL_MS
int "Remote log flush interval"
default 5000
range 1000 60000
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_UPLOAD_TIMEOUT_MS
int "Remote log upload timeout"
default 8000
range 3000 30000
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_MAX_FILES
int "Remote log persisted file count"
default 32
range 4 128
depends on TQ_REMOTE_LOG_ENABLE
config TQ_REMOTE_LOG_FILE_MAX_BYTES
int "Remote log persisted file max bytes"
default 16384
range 4096 65536
depends on TQ_REMOTE_LOG_ENABLE
endmenu
config TQ_KEY_INPUT_ENABLE
bool "Enable interrupt-driven key input task"
default y