logging

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileExtension

func GetFileExtension(logFormat types.LogFormat) string

func GetFormatDescription

func GetFormatDescription(logFormat types.LogFormat) string

Types

type BackgroundStreamer

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

BackgroundStreamer manages background streaming processes

func NewBackgroundStreamer

func NewBackgroundStreamer(hostInfo *host.InfoStat) *BackgroundStreamer

NewBackgroundStreamer creates a new background streamer

func (*BackgroundStreamer) GetProcessByID

func (bs *BackgroundStreamer) GetProcessByID(id string) (*types.BackgroundProcess, bool)

GetProcessByID returns a process by its ID

func (*BackgroundStreamer) GetProcesses

func (bs *BackgroundStreamer) GetProcesses() []types.BackgroundProcess

GetProcesses returns a copy of all processes

func (*BackgroundStreamer) RemoveStoppedProcess

func (bs *BackgroundStreamer) RemoveStoppedProcess(id string) error

RemoveStoppedProcess removes a stopped process from the manager

func (*BackgroundStreamer) StartProcess

func (bs *BackgroundStreamer) StartProcess(id, name string, logFormat types.LogFormat,
	interval types.StreamInterval, logPath string) error

StartProcess starts a new background streaming process

func (*BackgroundStreamer) StopAllProcesses

func (bs *BackgroundStreamer) StopAllProcesses()

StopAllProcesses stops all background streaming processes

func (*BackgroundStreamer) StopProcess

func (bs *BackgroundStreamer) StopProcess(id string) error

StopProcess stops a background streaming process

type Logger

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

func NewLogger

func NewLogger(logPath string, hostInfo *host.InfoStat) *Logger

func (*Logger) StopStreaming

func (l *Logger) StopStreaming(startTime time.Time, interval types.StreamInterval, logFormat types.LogFormat, streamCount int)

func (*Logger) WriteMetricsToLogs

func (l *Logger) WriteMetricsToLogs(metrics types.MetricsMsg, logFormat types.LogFormat)

type XMLMetric

type XMLMetric struct {
	XMLName   xml.Name               `xml:"metric"`
	Timestamp string                 `xml:"timestamp"`
	Hostname  string                 `xml:"hostname"`
	Type      string                 `xml:"type"`
	Data      map[string]interface{} `xml:"data"`
}

type YAMLMetric

type YAMLMetric struct {
	Timestamp string                 `yaml:"timestamp"`
	Hostname  string                 `yaml:"hostname"`
	Type      string                 `yaml:"type"`
	Data      map[string]interface{} `yaml:"data"`
}

Jump to

Keyboard shortcuts

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