Documentation ¶
Index ¶
- func ColorLogFormatter(logData *LogData) string
- func DefaultLogFormatter(logData *LogData) string
- type DefaultLogger
- func (ss *DefaultLogger) Debugf(format string, args ...any)
- func (ss *DefaultLogger) Errorf(format string, args ...any)
- func (ss *DefaultLogger) Fatalf(format string, args ...any)
- func (ss *DefaultLogger) Infof(format string, args ...any)
- func (ss *DefaultLogger) Tracef(format string, args ...any)
- func (ss *DefaultLogger) Warnf(format string, args ...any)
- type ILogHandler
- type ILogger
- type ILoggerInjector
- type Level
- type LogData
- type LogFormatterContainer
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorLogFormatter ¶
func DefaultLogFormatter ¶
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
func NewDefaultLogger ¶
func NewDefaultLogger(path string, handler ILogHandler, logDataBuilder func(data *LogData)) *DefaultLogger
func (*DefaultLogger) Debugf ¶
func (ss *DefaultLogger) Debugf(format string, args ...any)
func (*DefaultLogger) Errorf ¶
func (ss *DefaultLogger) Errorf(format string, args ...any)
func (*DefaultLogger) Fatalf ¶
func (ss *DefaultLogger) Fatalf(format string, args ...any)
func (*DefaultLogger) Infof ¶
func (ss *DefaultLogger) Infof(format string, args ...any)
func (*DefaultLogger) Tracef ¶
func (ss *DefaultLogger) Tracef(format string, args ...any)
func (*DefaultLogger) Warnf ¶
func (ss *DefaultLogger) Warnf(format string, args ...any)
type ILogHandler ¶
type ILogHandler interface {
Log(data *LogData)
}
func NewSimpleLogHandler ¶
func NewSimpleLogHandler() ILogHandler
type ILoggerInjector ¶
type ILoggerInjector interface {
// contains filtered or unexported methods
}
type LogFormatterContainer ¶
type LogFormatterContainer struct {
// contains filtered or unexported fields
}
func NewLogFormatterRepository ¶
func NewLogFormatterRepository() *LogFormatterContainer
func (*LogFormatterContainer) AddFormatter ¶
func (ss *LogFormatterContainer) AddFormatter(name string, formatter func(logData *LogData) string)
func (*LogFormatterContainer) GetFormatter ¶
func (ss *LogFormatterContainer) GetFormatter(name string) func(logData *LogData) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.