feat(readarr): fetch Readarr logs and expose them on the CLI

Adds ReadarrEvent::GetLogs backed by get_readarr_logs, which formats each
record into the Readarr logs list, and surfaces it as
'readarr list logs --events N'.

The --output-in-log-format branch reads the Readarr log lines, and is
covered by a test that pins that source so it cannot silently drift to
another servarr's data.
This commit is contained in:
Dark-Alex-17 committed 2026-08-20 21:33:57 -06:00
1 parent c6d729162a
commit 690a17e152
6 files changed
+276 -9

No files matched your search

+6
View File
@@ -15,6 +15,7 @@ mod readarr_network_tests;
pub enum ReadarrEvent {
GetDiskSpace,
GetHostConfig,
GetLogs(u64),
GetSecurityConfig,
GetStatus,
GetUpdates,
@@ -27,6 +28,7 @@ impl NetworkResource for ReadarrEvent {
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
ReadarrEvent::GetDiskSpace => "/diskspace",
ReadarrEvent::HealthCheck => "/health",
ReadarrEvent::GetLogs(_) => "/log",
ReadarrEvent::GetStatus => "/system/status",
ReadarrEvent::GetUpdates => "/update",
}
@@ -53,6 +55,10 @@ impl Network<'_, '_> {
.get_readarr_host_config()
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetLogs(events) => self
.get_readarr_logs(events)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetSecurityConfig => self
.get_readarr_security_config()
.await