logging

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 8 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(format string, args ...any)

Debug logs a debug message

func Error

func Error(format string, args ...any)

Error logs an error message

func GetLogPath

func GetLogPath() string

GetLogPath returns the current log file path

func Info

func Info(format string, args ...any)

Info logs an info message

func Initialize

func Initialize(logDir string, level Level) error

Initialize sets up the default logger

func SetEnabled

func SetEnabled(enabled bool)

SetEnabled enables or disables logging

func Warn

func Warn(format string, args ...any)

Warn logs a warning message

func WithError

func WithError(err error, context string)

WithError logs an error with context

Types

type Level

type Level int

Level represents log severity

const (
	LevelDebug Level = iota
	LevelInfo
	LevelWarn
	LevelError
)

func (Level) String

func (l Level) String() string

type Logger

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

Logger provides structured logging

Jump to

Keyboard shortcuts

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