Versions in this module Expand all Collapse all v1 v1.0.39 Oct 28, 2026 Changes in this version + func CopyDockerLogs(stdout, stderr io.Writer, src io.Reader) (int64, error) + type DockerLogLine struct + Stream string + Text string + func ReadDockerLogLines(src io.Reader) ([]DockerLogLine, error) v1.0.38 Oct 20, 2026 Changes in this version + const DefaultBufferTTL + const DefaultMaxBuffer + func SanitizeLogMessage(msg string) string + type Config struct + BufferTTL time.Duration + Compress bool + Enabled bool + FilePath string + MaxAge int + MaxBackups int + MaxBuffer int + MaxSize int + type ContainerLogStream struct + type LogClientResolver interface + ResolveLogClient func(ctx context.Context, containerID string) (*client.Client, error) + type LogStreamer struct + func NewLogStreamer(dockerClient *client.Client, log *Logger, maxEntriesPerContainer int) *LogStreamer + func (ls *LogStreamer) AddCommandEntry(containerID, command string, timestamp time.Time) + func (ls *LogStreamer) AddCommandOutput(containerID, output string, success bool, timestamp time.Time) + func (ls *LogStreamer) CleanupContainer(containerID string) + func (ls *LogStreamer) ClearLogs(containerID string) + func (ls *LogStreamer) GetLogs(containerID string, tail int) []*v1.LogEntry + func (ls *LogStreamer) MigrateSubscribers(oldContainerID, newContainerID string) + func (ls *LogStreamer) RemoveContainer(containerID string) + func (ls *LogStreamer) RemoveStream(containerID string) + func (ls *LogStreamer) SetClientResolver(r LogClientResolver) + func (ls *LogStreamer) StartStreaming(containerID string) error + func (ls *LogStreamer) StopStreaming(containerID string) + func (ls *LogStreamer) Subscribe(containerID string) chan *v1.LogEntry + func (ls *LogStreamer) Unsubscribe(containerID string, ch chan *v1.LogEntry) + type Logger struct + func New() *Logger + func NewWithConfig(cfg *Config) *Logger + func (l *Logger) Close() error + func (l *Logger) Debug(format string, args ...any) + func (l *Logger) Error(format string, args ...any) + func (l *Logger) Fatal(format string, args ...any) + func (l *Logger) GetLogFilePath() string + func (l *Logger) GetRecentLogs() []string + func (l *Logger) GetRecentLogsSince(since time.Duration) []string + func (l *Logger) Info(format string, args ...any) + func (l *Logger) SetBufferTTL(ttl time.Duration) + func (l *Logger) Warn(format string, args ...any)