logger

package
v0.0.0-...-75edfd4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger is the global logger instance
	Logger zerolog.Logger
)

Functions

func Debug

func Debug(msg string)

Debug logs a debug message

func Error

func Error(msg string)

Error logs an error message

func Fatal

func Fatal(msg string)

Fatal logs a fatal message and exits

func Get

func Get() *zerolog.Logger

Get returns the global logger instance

func Info

func Info(msg string)

Info logs an info message

func Init

func Init(level string, pretty bool)

Init initializes the global logger with the specified level and output

func Warn

func Warn(msg string)

Warn logs a warning message

func WithComponent

func WithComponent(component string) *zerolog.Logger

WithComponent returns a logger with a component field set

func WithField

func WithField(key string, value interface{}) *zerolog.Logger

WithField adds a custom field to the logger

Types

type LogLevel

type LogLevel string

LogLevel represents the logging level

const (
	DebugLevel LogLevel = "debug"
	InfoLevel  LogLevel = "info"
	WarnLevel  LogLevel = "warn"
	ErrorLevel LogLevel = "error"
)

Jump to

Keyboard shortcuts

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