syslog

package
v1.0.166 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parser added in v1.0.150

func Parser() func(log string) (*LogEntry, error)

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 NewWithShimConnection added in v1.0.122

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

NewWithShimConnection connects to the syslog_relay service over a tunnel interface and the service port is obtained from remote service discovery

func NewWithUsbmuxdConnection added in v1.0.122

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

NewWithUsbmuxdConnection connects to the syslog_relay service on the device over the usbmuxd socket

func (*Connection) Close

func (sysLogConn *Connection) Close() error

Close closes the underlying UsbMuxConnection

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.

type LogEntry added in v1.0.150

type LogEntry struct {
	Timestamp string `json:"timestamp"`
	Device    string `json:"device"`
	Process   string `json:"process"`
	PID       string `json:"pid"`
	Level     string `json:"level"`
	Message   string `json:"message"`
}

LogEntry represents a parsed log entry

Jump to

Keyboard shortcuts

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