logger

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message string)

func DebugC

func DebugC(component string, message string)

func DebugCF

func DebugCF(component string, message string, fields map[string]any)

func DebugF

func DebugF(message string, fields map[string]any)

func DisableFileLogging

func DisableFileLogging()

func EnableFileLogging

func EnableFileLogging(filePath string) error

func Error

func Error(message string)

func ErrorC

func ErrorC(component string, message string)

func ErrorCF

func ErrorCF(component string, message string, fields map[string]any)

func ErrorF

func ErrorF(message string, fields map[string]any)

func Fatal

func Fatal(message string)

func FatalC

func FatalC(component string, message string)

func FatalCF

func FatalCF(component string, message string, fields map[string]any)

func FatalF

func FatalF(message string, fields map[string]any)

func Info

func Info(message string)

func InfoC

func InfoC(component string, message string)

func InfoCF

func InfoCF(component string, message string, fields map[string]any)

func InfoF

func InfoF(message string, fields map[string]any)

func SetLevel

func SetLevel(level LogLevel)

func Warn

func Warn(message string)

func WarnC

func WarnC(component string, message string)

func WarnCF

func WarnCF(component string, message string, fields map[string]any)

func WarnF

func WarnF(message string, fields map[string]any)

Types

type LogEntry

type LogEntry struct {
	Level     string         `json:"level"`
	Timestamp string         `json:"timestamp"`
	Component string         `json:"component,omitempty"`
	Message   string         `json:"message"`
	Fields    map[string]any `json:"fields,omitempty"`
	Caller    string         `json:"caller,omitempty"`
}

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	WARN
	ERROR
	FATAL
)

func GetLevel

func GetLevel() LogLevel

type Logger

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

Jump to

Keyboard shortcuts

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