logging

package
v0.32.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure()

func GetLogger

func GetLogger() *slog.Logger

Types

type KugoCustomLogger added in v0.24.2

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

KugoCustomLogger is a custom logger that uses slog and filters based on the log level

func NewKugoCustomLogger added in v0.24.2

func NewKugoCustomLogger(level LogLevel) *KugoCustomLogger

func (*KugoCustomLogger) Debug added in v0.24.2

func (l *KugoCustomLogger) Debug(message string, kvs ...ogmigo.KeyValue)

Debug logs debug-level messages only if log level is set to DEBUG

func (*KugoCustomLogger) Info added in v0.24.2

func (l *KugoCustomLogger) Info(message string, kvs ...ogmigo.KeyValue)

Info logs info-level messages

func (*KugoCustomLogger) With added in v0.24.2

func (l *KugoCustomLogger) With(kvs ...ogmigo.KeyValue) ogmigo.Logger

With returns a new logger with additional context (key-value pairs)

type LogLevel added in v0.24.2

type LogLevel int

LogLevel represents the logging level (either INFO or DEBUG)

const (
	LevelInfo LogLevel = iota
	LevelDebug
)

Jump to

Keyboard shortcuts

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