Logging
Set Miravo log levels, switch between pretty and JSON logs, and stream factory events by channel.
Miravo writes its logs to stderr. Command results, such as tables, summaries, and --json output, go to stdout. That split lets you pipe results to jq while logs still reach your terminal or container log collector.
Levels
| Level | Switch | What shows up |
|---|---|---|
debug | --log-level debug or --verbose | Tick details, adapter internals, and startup traces |
info | Default | Startup, shutdown, state changes, periodic summaries |
warn | --log-level warn | Warnings and errors |
error | --log-level error or --quiet | Errors |
Precedence is --quiet, then --log-level, then --verbose. --log-level, --verbose, and --log-format are start flags. NO_COLOR removes ANSI styling. So does --plain, which also keeps the text layout stable.
Output format
Each line has an optional level word, the source, and the message.
start Engine: Starting Miravo...
success Engine: Factory started.
Engine: 5s · 1.0 ticks/s · 0 data pointsmiravo start --log-level infoEvent streaming
miravo logs is separate from the process log. It reads fault, lifecycle, asset, engine, and adapter events from a running factory. The engine channel carries state changes and engine:error events (context, message, optional fix), so a non-zero core.engineErrorsCount in /api/metrics always has a matching line. Tick overruns are warnings in the process log, not engine:error events.
| Command | Result |
|---|---|
miravo logs | Stream all channels except tick |
miravo logs --tail 50 | Print the last 50 events, then stream |
miravo logs --no-follow | Print the last 50 events and exit |
miravo logs --channels faults,lifecycle | Stream only the selected channels |
miravo logs --json | Emit NDJSON on stdout |
With --json, each line is {"source":"history"|"live","event":{...}}. Both carry the same type-discriminated event, such as {"type":"fault:triggered","assetId":"pump-001","fault":"cavitation"}. Asset events always use assetId. History events also include id, tick, simulationTime, and timestamp; live events do not.
miravo logs --channels faults --json | jq -c '.event'Reference
| Switch or env var | Effect |
|---|---|
--log-level <level> | debug, info, warn, or error |
-v, --verbose | Shorthand for --log-level debug |
-q, --quiet | Errors only |
--log-format json | Structured JSON lines |
--plain | Plain text, no ANSI styling |
NO_COLOR=1 | No ANSI styling in pretty output |
MIRAVO_DEBUG=1 or --debug | Stack traces for unexpected failures |
Next
CLI ⭢ miravo logs
Flags, --json, --tail, and channels.
Docker
Running Miravo in a container.
Environment variables
MIRAVO_DEBUG and NO_COLOR.
Was this page useful?
Last updated on
Miravo