logger

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Log is the global logger instance
	Log *zap.SugaredLogger
)

Functions

func GetLogger

func GetLogger() *zap.SugaredLogger

GetLogger returns the global logger instance

func Initialize

func Initialize(level LogLevel) error

Initialize initializes the global logger with the specified log level

func Sync

func Sync() error

Sync flushes any buffered log entries

func ValidLogLevels

func ValidLogLevels() []string

ValidLogLevels returns all valid log levels

Types

type LogLevel

type LogLevel string

LogLevel represents the available log levels

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

func ParseLogLevel

func ParseLogLevel(level string) (LogLevel, error)

ParseLogLevel parses a string into a LogLevel

Jump to

Keyboard shortcuts

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