syslog

package
v1.0.74 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection exposes the LogReader channel which send the LogMessages as strings.

func New

func New(device ios.DeviceEntry) (*Connection, error)

New returns a new SysLog Connection for the given DeviceID and Udid It will create LogReader as a buffered Channel because Syslog is very verbose.

func (*Connection) Close

func (sysLogConn *Connection) Close()

Close closes the underlying UsbMuxConnection

func (*Connection) Decode

func (sysLogConn *Connection) Decode(r io.Reader) (string, error)

Decode wraps the reader into a buffered reader and reads nullterminated strings from it syslog is very verbose, so the decoder sends the decoded strings to a bufferedChannel in a non blocking style. Do not call this manually, it is used by the underlying DeviceConnection.

func (*Connection) Encode

func (sysLogConn *Connection) Encode(message interface{}) ([]byte, error)

Encode returns only and error because syslog is read only.

func (*Connection) ReadLogMessage

func (sysLogConn *Connection) ReadLogMessage() (string, error)

ReadLogMessage this is a blocking function that will return individual log messages received from syslog. Call it in an endless for loop in a separate go routine.

Jump to

Keyboard shortcuts

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