Skip to content

Set default synapsectl logs to something that doesn't return an error #144

Description

@kalashb

Right now, synapsectl --uri {device_name} logs command straight up throws an error - at least in the contexts I've used it so far

>>> synapsectl --uri {device_name} logs ( ● ) Getting logs...[07/17/25 10:58:03] ERROR ERROR:synapse.client.device:Error: device.py:164
No logs found for the specified criteria

This works: synapsectl --uri wapiti-of-splendid-certainty logs --log-level DEBUG --follow

But in my opinion it isn't clear from the help message what it does. Also maybe it shouldn't return ERROR on the default logs comment.

>>> synapsectl --uri wapiti-of-splendid-certainty logs --help
usage: synapsectl logs [-h] [--output OUTPUT] [--quiet]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--follow]
[--since N] [--start-time START_TIME] [--end-time END_TIME]
options:
-h, --help show this help message and exit
--output, -o OUTPUT Optional file to write logs to
--quiet, -q Suppress output to stdout
--log-level, -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Log level to filter by
--follow, -f Follow log output
--since, -S N Get logs from the last N milliseconds
--start-time START_TIME
Start time in ISO format (e.g., '2024-03-14T15:30:00')
--end-time END_TIME End time in ISO format (e.g., '2024-03-14T15:30:00')

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions