logging

package
v0.0.0-...-6c6898a Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package logging provides set of API to retrieve system and instance log

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceIDProvider

type InstanceIDProvider interface {
	GetInstanceIDs(ids cloudprotocol.InstanceFilter) ([]string, error)
}

InstanceIDProvider provides instances ID.

type JournalInterface

type JournalInterface interface {
	Close() error
	AddMatch(match string) error
	AddDisjunction() error
	SeekTail() error
	SeekHead() error
	SeekRealtimeUsec(usec uint64) error
	Previous() (uint64, error)
	Next() (uint64, error)
	GetEntry() (*sdjournal.JournalEntry, error)
}
var SDJournal JournalInterface //nolint:gochecknoglobals

SDJournal is using to mock systemd journal in unit tests.

type Logging

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

Logging instance.

func New

func New(config *config.Config, instanceProvider InstanceIDProvider) (instance *Logging, err error)

New creates new logging object.

func (*Logging) Close

func (instance *Logging) Close()

Close closes logging.

func (*Logging) GetInstanceCrashLog

func (instance *Logging) GetInstanceCrashLog(request cloudprotocol.RequestLog) error

GetServiceCrashLog returns instance crash log.

func (*Logging) GetInstanceLog

func (instance *Logging) GetInstanceLog(request cloudprotocol.RequestLog) error

GetInstanceLog returns instance log.

func (*Logging) GetLogsDataChannel

func (instance *Logging) GetLogsDataChannel() (channel <-chan cloudprotocol.PushLog)

GetLogsDataChannel returns channel with logs that are ready to send.

func (*Logging) GetSystemLog

func (instance *Logging) GetSystemLog(request cloudprotocol.RequestLog)

GetSystemLog returns system log.

Jump to

Keyboard shortcuts

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