logger

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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