logs: stream corrosion logs with 'uc machine logs corrosion' from container instead of journal (fixes #392)

This commit is contained in:
Pasha Sviderski
2026-06-17 18:28:25 +10:00
parent 247154eeb3
commit 7bb3cb9682
11 changed files with 91 additions and 83 deletions
+11 -1
View File
@@ -16,6 +16,16 @@ const (
LogStreamHeartbeat
)
// System service names whose logs can be streamed via client.MachineLogs.
const (
SystemServiceCorrosion = "corrosion"
SystemServiceDocker = "docker"
SystemServiceUncloud = "uncloud"
)
// SystemServices lists all system services that support log streaming.
var SystemServices = []string{SystemServiceCorrosion, SystemServiceDocker, SystemServiceUncloud}
type LogStreamType int
// LogStreamTypeFromProto converts a protobuf LogEntry.StreamType to the internal LogStreamType.
@@ -61,7 +71,7 @@ type ServiceLogsOptions struct {
Machines []string
}
// ServiceLogEntry represents a single log entry from a service container or systemd service.
// ServiceLogEntry represents a single log entry from a service container or system service.
type ServiceLogEntry struct {
// Metadata may not be set if an error occurred (Err is not nil).
Metadata ServiceLogEntryMetadata