Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChannelConfig ¶
type ChannelConfig struct {
Driver string `json:"driver"`
Level string `json:"level"`
Path string `json:"path,omitempty"`
MaxSize int `json:"max_size,omitempty"` // MB
MaxAge int `json:"max_age,omitempty"` // days
MaxBackups int `json:"max_backups,omitempty"` // number of old files
Format string `json:"format,omitempty"` // json, text
Options map[string]interface{} `json:"options,omitempty"` // driver-specific options
}
ChannelConfig defines configuration for a specific log channel
type LoggingConfig ¶
type LoggingConfig struct {
Default string `json:"default"`
Channels map[string]ChannelConfig `json:"channels"`
}
LoggingConfig defines the logging configuration structure
func GetLoggingConfig ¶
func GetLoggingConfig() LoggingConfig
GetLoggingConfig returns the default logging configuration
func (LoggingConfig) GetChannel ¶
func (c LoggingConfig) GetChannel(name string) (ChannelConfig, bool)
GetChannel returns a specific channel configuration
func (LoggingConfig) GetDefaultChannel ¶
func (c LoggingConfig) GetDefaultChannel() (ChannelConfig, bool)
GetDefaultChannel returns the default channel configuration
Click to show internal directories.
Click to hide internal directories.