Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogTailer ¶
type LogTailer interface { // Logs returns the channel through which the LogTailer returns Juju logs. // It will be closed when the tailer stops. Logs() <-chan *corelogger.LogRecord // Dying returns a channel which will be closed as the LogTailer stops. Dying() <-chan struct{} // Kill implements worker.Kill. Kill() // Wait implements worker.Wait. Wait() error }
LogTailer allows for retrieval of Juju's logs. It first returns any matching already recorded logs and then waits for additional matching logs as they appear.
func NewLogTailer ¶
func NewLogTailer( modelUUID, logFile string, params LogTailerParams, ) (LogTailer, error)
NewLogTailer returns a LogTailer which returns lines from a log file and filters according to the parameters given.
type LogTailerParams ¶
type LogTailerParams struct { StartTime time.Time MinLevel corelogger.Level InitialLines int Firehose bool NoTail bool IncludeEntity []string ExcludeEntity []string IncludeModule []string ExcludeModule []string IncludeLabels map[string]string ExcludeLabels map[string]string FromTheStart bool }
LogTailerParams specifies the filtering a LogTailer should apply to log records in order to decide which to return.
Click to show internal directories.
Click to hide internal directories.