cmd plugin logs - nself-org/cli GitHub Wiki
Tail or print logs from a plugin container.
nself plugin logs <name> [flags]Wraps docker logs with plugin-aware container name resolution. Resolves the container
from the plugin name using the ɳSelf naming convention (nself-plugin-<name>) then falls
back to a docker compose ps lookup.
Supports live streaming, line limits, time filters, and regex filtering.
| Flag | Short | Default | Description |
|---|---|---|---|
--follow |
-f |
false | Follow log output (live stream) |
--tail |
100 | Number of lines from the end (0 = all; default 100 when not following) | |
--since |
Show logs since duration (e.g. 1h, 30m, 5s) |
||
--grep |
Regex pattern to filter log lines |
# Show last 100 lines (default)
nself plugin logs myplugin
# Live stream
nself plugin logs myplugin --follow
nself plugin logs myplugin -f
# Last 50 lines
nself plugin logs myplugin --tail 50
# Logs from the last 30 minutes
nself plugin logs myplugin --since 30m
# Filter for errors
nself plugin logs myplugin --grep "ERROR"
# Live stream + filter
nself plugin logs myplugin -f --grep "ERROR|WARN"The command tries these names in order until one matches:
nself-plugin-<name>nself_plugin_<name>-
<name>(bare name) -
docker compose pslookup (scans service names for a match)
If no container is found, the command exits with a descriptive error.
For production log analysis, use the Grafana/Loki stack included in the ɳSelf monitoring bundle. Equivalent Loki query:
{container=~"nself-plugin-myplugin"} |= "ERROR"
See Observability guide for the Grafana dashboard.
- cmd-plugin-dev, hot-reload watcher
- cmd-plugin-debug, attach Delve debugger
- cmd-plugin-status, check plugin runtime state
- Home