syslog

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The program on fuchsia used to stream system logs through a shell, not to
	// be confused with the zircon host tool "loglistener" (no underscore) used
	// to stream zircon-level logs to host.
	LogListener = "/bin/log_listener"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Syslogger

type Syslogger struct {
	// contains filtered or unexported fields
}

Syslogger streams systems logs from a Fuchsia instance.

func NewSyslogger

func NewSyslogger(client *sshutil.Client) *Syslogger

NewSyslogger creates a new Syslogger, given an SSH session with a Fuchsia instance.

func (*Syslogger) IsRunning

func (s *Syslogger) IsRunning() bool

IsRunning returns whether the syslog is still streaming. Once the goroutine started in Stream() completes, this should return false.

func (*Syslogger) Stream

func (s *Syslogger) Stream(ctx context.Context, output io.Writer) <-chan error

Stream writes system logs to a given writer, starting from the very beginning of the system's uptime. It keeps running until the context is canceled or until an unexpected (not SSH-related) error occurs; otherwise, it returns errors to the returned channel to signify the syslog was interrupted and restarted.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL