d3vmeh/dsh-logbook

Makes ctx.logger output visible: a /logs command with filters, plus a stderr exporter on for warnings and errors by default.

Fixes a real blind spot the README documents with upstream issue numbers: every dsh plugin logs through ctx.logger, no shipped profile mounts a log sink, and the only default destination is a 1000-record in-memory buffer that drops warn and debug because cordis orders levels error=0, info=1, warn=2, debug=3 while the buffer exporter falls back to each logger's default of 1. So a plugin could warn about a real problem and there was no way to see it, live or after the fact. This gives two views: a stderr exporter that is silent on a healthy session and can be opened up per plugin, and a /logs command with filters (/logs --since 10m --limit 100) over a default 2000-record ring at all levels. It also records an upstream caveat honestly — cordis's exporter disposer currently removes the most recently registered exporter rather than its own, so a plugin reload can detach another plugin's sink — and attaches an error listener so a closed stderr pipe cannot crash dsh.

Infrastructure & Deployment ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add dsh-logbook

The npm line, and the README says that is enough — no config is required to get value. Tuning happens in the profile's cordis.patch.yml, where a per-plugin config map sets the default level to error, warn, info, debug or off. One deliberate semantic difference is documented: a value means "this type and anything more severe" in the order error, warn, info, debug, which is not cordis's numeric ordering, where info sits below warn and the usual "warnings and errors only" shorthand misbehaves.

Compatibility

Any DSH profile that mounts plugins through the patch layer; it registers one full-capture exporter and filters itself rather than relying on cordis's level negotiation, which is the point. It never writes to stdout, so the SDK and ACP protocol channels stay clean — the live view is stderr. The ring captures every level from the moment the plugin mounts and seeds itself from the built-in buffer for anything earlier, but records from before the mount can only be error and info, because that buffer silently drops warn and debug in the first place.

Details

Alternatives

vlln/dsh-loop · donoteatme/dsh-local-link · lehhair/dsh-mobile

More plugins in Infrastructure & Deployment

Browse more in Infrastructure & Deployment

Guides for Infrastructure & Deployment plugins