Documentation
¶
Index ¶
- Constants
- type Logger
- func (l *Logger) Debug(message string, fields map[string]any)
- func (l *Logger) Dispatcher(d event.Dispatcher)
- func (l *Logger) Error(message string, fields map[string]any)
- func (l *Logger) Fatal(message string, fields map[string]any)
- func (l *Logger) Formatter(formatter logger.Formatter)
- func (l *Logger) Hooks(hooks ...logger.Hook)
- func (l *Logger) Info(message string, fields map[string]any)
- func (l *Logger) Outputs(outputs ...io.Writer)
- func (l *Logger) Panic(message string, fields map[string]any)
- func (l *Logger) Warn(message string, fields map[string]any)
- type Manager
- func (m *Manager) AddChannel(name string, logger logger.Logger)
- func (m *Manager) Channel(name string) logger.Logger
- func (m *Manager) Debug(message string, context map[string]any)
- func (m *Manager) Dispatcher(d event.Dispatcher)
- func (m *Manager) Error(message string, context map[string]any)
- func (m *Manager) Fatal(message string, context map[string]any)
- func (m *Manager) Formatter(formatter logger.Formatter)
- func (m *Manager) Hooks(hooks ...logger.Hook)
- func (m *Manager) Info(message string, context map[string]any)
- func (m *Manager) Outputs(outputs ...io.Writer)
- func (m *Manager) Panic(message string, context map[string]any)
- func (m *Manager) Warn(message string, context map[string]any)
- type Option
- type RotateFileOutput
- type ServerProvider
Constants ¶
View Source
const ( Hourly = "@hourly" Daily = "@daily" )
cron
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger logger
func (*Logger) Dispatcher ¶
func (l *Logger) Dispatcher(d event.Dispatcher)
Dispatcher set event dispatcher
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager logger manager
func (*Manager) AddChannel ¶
AddChannel add channel
func (*Manager) Dispatcher ¶
func (m *Manager) Dispatcher(d event.Dispatcher)
Dispatcher set dispatcher for default logger
type RotateFileOutput ¶
type RotateFileOutput struct { *lumberjack.Logger RotationTime time.Duration // contains filtered or unexported fields }
RotateFileOutput rotate file output
func NewRotateFileOutput ¶
func NewRotateFileOutput( filename string, maxSize int, maxAge int, maxBackups int, localTime bool, compress bool, rotationCron string, ) *RotateFileOutput
NewRotateFileOutput new rotate file output
type ServerProvider ¶
type ServerProvider struct{}
ServerProvider logger server provider
func (*ServerProvider) Register ¶
func (s *ServerProvider) Register(c container.Container)
Register register
Source Files
¶
Click to show internal directories.
Click to hide internal directories.