Add UART SET_LOG_LEVEL for runtime master ESP-IDF logging.
Expose the command via goTool CLI/REST and dashboard controls so log verbosity can be tuned without reflashing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -282,6 +282,39 @@ Content-Type: application/json
|
||||
{"client_id": 16}
|
||||
```
|
||||
|
||||
### Log level (master ESP-IDF console)
|
||||
|
||||
Runtime get/set of the **global** log filter on the master (`esp_log_level_set("*", …)`). Output goes to **UART0** (USB debug, 115200), not the host protocol UART (GPIO 2/3, 921600).
|
||||
|
||||
```http
|
||||
GET /api/log-level
|
||||
POST /api/log-level
|
||||
Content-Type: application/json
|
||||
{"write": true, "level": 3}
|
||||
```
|
||||
|
||||
| `level` | Meaning |
|
||||
|---------|---------|
|
||||
| 0 | None (no log output) |
|
||||
| 1 | Error |
|
||||
| 2 | Warn |
|
||||
| 3 | Info |
|
||||
| 4 | Debug |
|
||||
| 5 | Verbose |
|
||||
|
||||
```json
|
||||
{"success": true, "level": 3}
|
||||
```
|
||||
|
||||
**CLI:**
|
||||
|
||||
```bash
|
||||
go run . -port /dev/ttyUSB0 log-level
|
||||
go run . -port /dev/ttyUSB0 log-level -set -level 3
|
||||
```
|
||||
|
||||
Dashboard: Master card → dropdown **ESP Log-Level** with **Lesen** / **Setzen**.
|
||||
|
||||
### OTA (master UART upload)
|
||||
|
||||
```http
|
||||
@@ -329,5 +362,6 @@ Same as external API:
|
||||
| Alle Slaves deadzone | `all_clients` + `slaves_only` on POST |
|
||||
| Unicast test | `POST /api/unicast-test` |
|
||||
| Echo ping | `POST /api/echo-ping` (per-slave latency; UI shows Host ms + ESP ms) |
|
||||
| Master log level | `GET` / `POST /api/log-level` or CLI `log-level` |
|
||||
| Tap notify S/D/T | `PUT /api/clients/{id}/tap-notify` |
|
||||
| Tap receive (UI) | Live stream + tap notify; see WebSocket doc for external API |
|
||||
|
||||
Reference in New Issue
Block a user