logger

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close closes the log file

func Debug

func Debug(category, message string)

Debug logs a debug message

func Error

func Error(category, message string)

Error logs an error message

func GetDefaultLogPath

func GetDefaultLogPath() string

GetLogPath returns the current log file path

func Info

func Info(category, message string)

Info logs an info message

func Init

func Init() error

Init initializes the logger with log file in user directory

func Warn

func Warn(category, message string)

Warn logs a warning message

Types

type LogLevel

type LogLevel int

LogLevel represents the severity of log messages

const (
	DEBUG LogLevel = iota
	INFO
	WARN
	ERROR
)

type Logger

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

Logger represents the application logger

func GetDefaultLogger

func GetDefaultLogger() *Logger

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...any)

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...any)

Jump to

Keyboard shortcuts

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