-
Notifications
You must be signed in to change notification settings - Fork 3
RaftLogManagerSysMod
Rob Dobson edited this page May 3, 2026
·
1 revision
Built-in SysMod that routes Raft log output (
LOG_I,LOG_W,LOG_E, ...) to one or more remote destinations and exposes runtime control via thelogREST endpoint.
- Configurable per-destination logging with rate-limiting and level control.
- Three built-in destination types:
-
RaftRemote— POSTs log lines to a Raft-aware HTTP endpoint -
Papertrail— UDP to Papertrail -
Loki— Grafana Loki HTTP push API
-
- Live enable/disable, level changes, and statistics through the
logREST endpoint.
logDests is an array; each entry must have at least type, name, enable. The other fields depend on the destination type — see the matching Logger* class in the source for details.
Common fields supported by most destinations:
| Key | Meaning |
|---|---|
level |
Min level: V D I W E (matches ESP IDF log levels) |
maxcount |
Rate-limit cap per window |
windowms |
Rate-limit window in ms |
bufsize |
Internal buffer size |
log returns/updates logger state:
| Form | Effect |
|---|---|
log |
List all configured loggers + status |
log/enable/<name> |
Enable a logger |
log/disable/<name> |
Disable a logger |
log/disconnect/<name> |
Close current connection (forces reconnect) |
log/config/<name>?level=&maxcount=&windowms=&bufsize= |
Update parameters at runtime |
-
Raft Remote Logging — the
RaftRemotedestination protocol - Logger Loki Implementation — design notes (devdoc)
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
- PlatformIO / Arduino
Scaffolding & Building
- Raft CLI
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
Helpers
Reference
{ "name": "LogManager", "logDests": [ { "type": "Loki", "name": "loki1", "enable": 1, "host": "logs.example.com", "port": 443, "user": "...", "key": "...", "level": "I" }, { "type": "Papertrail", "name": "pt1", "enable": 1, "host": "logs.papertrailapp.com", "port": 12345, "level": "W" } ] }