logger

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SkipUseLevel = 3

Variables

View Source
var (
	DirectionApp = storage.GetAppDir()

	ErrGetStorageInfo = errors.New("err get info use log - storage")
	ErrCreateStorage  = errors.New("err at created log file")
	ErrGetOpenFile    = errors.New("err get open log file")
)
View Source
var ErrGetConsoleInfo = errors.New("err get info use log - console")

Functions

func Debug added in v2.3.0

func Debug(value any)

func Error added in v2.3.0

func Error(value any)

func Info

func Info(value any)

func Set added in v2.3.0

func Set(logger Logger)

func Warn added in v2.3.0

func Warn(value any)

Types

type CombinedLogger added in v2.3.0

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

func NewCombinedLogger added in v2.3.0

func NewCombinedLogger(loggers ...Logger) *CombinedLogger

func (*CombinedLogger) Debug added in v2.3.0

func (cl *CombinedLogger) Debug(value any)

func (*CombinedLogger) Error added in v2.3.0

func (cl *CombinedLogger) Error(value any)

func (*CombinedLogger) Info added in v2.3.0

func (cl *CombinedLogger) Info(value any)

func (*CombinedLogger) Warn added in v2.3.0

func (cl *CombinedLogger) Warn(value any)

type ConsoleLogger added in v2.3.0

type ConsoleLogger struct{}

func NewConsoleLogger added in v2.3.0

func NewConsoleLogger() *ConsoleLogger

func (*ConsoleLogger) Debug added in v2.3.0

func (sl *ConsoleLogger) Debug(value any)

func (*ConsoleLogger) Error added in v2.3.0

func (sl *ConsoleLogger) Error(value any)

func (*ConsoleLogger) Info added in v2.3.0

func (sl *ConsoleLogger) Info(value any)

func (*ConsoleLogger) Warn added in v2.3.0

func (sl *ConsoleLogger) Warn(value any)

type Logger added in v2.3.0

type Logger interface {
	Error(value any) // Logs error messages
	Debug(value any) // Logs debug information
	Info(value any)  // Logs general information
	Warn(value any)  // Logs warning messages
}

Logger interface defines standard logging methods

func Get added in v2.3.0

func Get() Logger

type StatusLog added in v2.3.0

type StatusLog string
const (
	ErrorStatus StatusLog = "ERROR"
	DebugStatus StatusLog = "DEBUG"
	InfoStatus  StatusLog = "INFO"
	WarnStatus  StatusLog = "WARN"
)

type StorageLogger added in v2.3.0

type StorageLogger struct{}

func NewStorageLogger added in v2.3.0

func NewStorageLogger() *StorageLogger

func (*StorageLogger) Debug added in v2.3.0

func (sl *StorageLogger) Debug(value any)

func (*StorageLogger) Error added in v2.3.0

func (sl *StorageLogger) Error(value any)

func (*StorageLogger) Info added in v2.3.0

func (sl *StorageLogger) Info(value any)

func (*StorageLogger) Warn added in v2.3.0

func (sl *StorageLogger) Warn(value any)

Jump to

Keyboard shortcuts

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