Documentation ¶
Overview ¶
Package logging provides set of API to retrieve system and instance log
Index ¶
- type InstanceIDProvider
- type JournalInterface
- type Logging
- func (instance *Logging) Close()
- func (instance *Logging) GetInstanceCrashLog(request cloudprotocol.RequestLog) error
- func (instance *Logging) GetInstanceLog(request cloudprotocol.RequestLog) error
- func (instance *Logging) GetLogsDataChannel() (channel <-chan cloudprotocol.PushLog)
- func (instance *Logging) GetSystemLog(request cloudprotocol.RequestLog)
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) 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.
Click to show internal directories.
Click to hide internal directories.