logger

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields map[string]interface{})

Debug logs a debug message

func Error

func Error(msg string, err error, fields map[string]interface{})

Error logs an error message

func Fatal

func Fatal(msg string, err error, fields map[string]interface{})

Fatal logs a fatal error message

func GetLogFilePath

func GetLogFilePath() string

GetLogFilePath returns the path to the current log file

func Info

func Info(msg string, fields map[string]interface{})

Info logs an info message

func Initialize

func Initialize() error

Initialize sets up the logger with log rotation

func SetMinLevel

func SetMinLevel(level LogLevel)

SetMinLevel sets the minimum log level to record

func Warn

func Warn(msg string, fields map[string]interface{})

Warn logs a warning message

Types

type LogLevel

type LogLevel int

LogLevel represents the severity of a log message

const (
	DEBUG LogLevel = iota
	INFO
	WARN
	ERROR
	FATAL
)

func (LogLevel) String

func (l LogLevel) String() string

String returns the string representation of the log level

type Logger

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

Logger is the global logger instance

Jump to

Keyboard shortcuts

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