Logging
Configure Miravo's logging with debug, info, warn, and error levels, JSON format, structured output, tagged subsystem loggers, and event channel streaming.
Miravo uses consola with tagged loggers for each subsystem.
Log Levels
Section titled “Log Levels”| Level | Flag | Description |
|---|---|---|
debug | --verbose | Generator evaluations, tick details, adapter internals |
info | Default | Startup, shutdown, periodic summaries, state transitions |
warn | — | Overrun warnings, adapter saturation, deprecation notices |
error | — | Tick failures, adapter errors, command failures |
Set the level:
miravo start --log-level debugmiravo start --verbose # Same as --log-level debugmiravo start -q # Quiet: suppress non-error outputPriority: -q/--quiet > --log-level > --verbose.
Output Formats
Section titled “Output Formats”Pretty (default)
Section titled “Pretty (default)”Human-readable colored output with tagged prefixes:
[engine] Simulation "smart-factory" started (7 instances, 1 template)[mqtt] Embedded broker listening on 127.0.0.1:1883[engine] Tick 30 | 7 instances · 168 values | MQTT: 168 pub · 0 errStructured JSON, one object per line. Ideal for log aggregation (ELK, Datadog, Loki):
miravo start --log-format json{"ts":"2026-03-18T10:00:00.000Z","level":"info","tag":"engine","simulationName":"smart-factory","runId":"abc123","message":"Simulation started"}JSON fields: ts, level, tag, simulationName, runId, message.
No colors or formatting. Useful for CI/CD or piping:
miravo start --plainOr via environment variable:
NO_COLOR=1 miravo startLogger Tags
Section titled “Logger Tags”Each subsystem has a tagged logger:
| Tag | Subsystem |
|---|---|
engine | Core engine, scheduler, lifecycle |
mqtt | MQTT adapter, broker, control transport |
opcua | OPC UA adapter, server, address space |
admin | Admin HTTP server |
cli | CLI command processing |
Periodic Summary
Section titled “Periodic Summary”Every 30 seconds (configurable with --summary-interval), Miravo logs a summary line:
Tick 1800 | 7 instances · 168 values | MQTT: 302,400 pub · 0 err | OPC UA: disabledThis includes tick count, instance count, member value count, and per-adapter statistics.
Streaming Events
Section titled “Streaming Events”Use miravo logs to stream domain events from a running background simulation:
Stream all events:
miravo logs my-simLast 50 events, then stream:
miravo logs my-sim --tail 50Filter by channel:
miravo logs my-sim --channels faults,lifecycleAvailable channels: tick, faults, lifecycle, instances, engine, adapters.