This page was generated from the source of RoboHub. Edit the source, not this page.
robohub-provider-log
An alert channel that appends each alert as a line to a file on the machine. It
implements the robohub.alert interface (its send), and the application calls
alert.raise(...), never the provider (see robohub-alert/index). It needs
nothing outside the machine, which makes it the channel to bind first.
Binding it
deps:
robohub:
robohub-alert: ">=1.1.0"
robohub-provider-log: ">=0.2.0"
bind:
robohub.alert:
providers: [robohub-provider-log]
config:
robohub-provider-log:
path: "~/.rho/alerts.log"
Settings
| Setting | Default | What it is |
|---|---|---|
path | ~/.rho/alerts.log | The file; a leading ~/ is the user's home. Its folder is created when needed |
severity_threshold | everything | The lowest level written: INFO, WARNING, ERROR, CRITICAL |
enabled | on | "false" stops the channel |
Each line is [<level>] <message> <metadata>. The file is appended to rather
than rewritten, which is kinder to flash, and rotated once it passes 1 MB,
keeping three older files (.1 to .3). send answers 1 when the line was
written.
Release history
[0.1.0] - 2026-11-02
The local log provider for the alert contract.
[0.1.1] - 2026-11-08
Alert logs append instead of reading and rewriting the whole file, and rotate at 1 MB with three retained files.
[0.2.0] - 2026-11-12
A provider of the alert interface: the module lists robohub.alert under implements and exports send(level, message, metadata), which appends the alert to the file in path. Its settings are declared under provides.settings and read with rho_bind_config, from the binding of the application that uses it; the provider: block and the key=value; configuration string are gone, and the alert plugin that wrapped it was removed.
[0.2.1] - 2026-11-13
The log is rotated at 1 MB again: the size stat answers ends in a line break, which made it read as 0, so the log was never rotated.
[0.2.2] - 2026-11-14
Its data is kept where app_workspace() says (rho 0.8.0) — the application's workspace, else ~/.rho/apps/<app> — so two applications started by hand no longer share this module's records. Needs rho 0.8.0.