Documentation
¶
Index ¶
Constants ¶
View Source
const FileName = envconst.FilenameLogger
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 ¶
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
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)
Click to show internal directories.
Click to hide internal directories.