Skip to main content

logs

View output from running services.
$ sysg logs

Options

OptionDescription
--configPath to configuration file
--clearReset log files instead of displaying them
--serviceThe name of the service whose logs should be displayed (optional)
--linesNumber of lines to show (default: 50)
--kindKind of logs to show: stdout, stderr, or supervisor (default: stderr)
--streamContinuously refresh the latest log snapshot at the provided interval (e.g., 5, 1s, 2m)
--sysOpt into privileged system mode. Requires running as root
--log-levelSet verbosity (debug, info, warn, error)

Examples

View recent logs from all services

$ sysg logs

View logs from specific service

$ sysg logs --service api

Clear logs for a specific service

$ sysg logs --service api --clear
This truncates api’s current stdout and stderr log files in place and does not print logs.

Clear logs for all services

$ sysg logs --clear
This truncates all service log files, plus supervisor.log, in place and does not print logs.

View stderr logs

$ sysg logs --service api --kind stderr

View supervisor logs

$ sysg logs --kind supervisor

Show more history

$ sysg logs --service api --lines 200

Stream snapshots

$ sysg logs --service api --lines 200 --stream 2
In stream mode, each refresh prints a new snapshot of the latest --lines entries.

Log files

Logs are stored in ~/.local/share/systemg/logs/:
  • {service}_stdout.log - Standard output
  • {service}_stderr.log - Standard error (primary log stream)
Note: systemg treats stderr as the primary log stream. Service logs written to stderr are given priority in the supervisor’s log output.

See also