Documentation ¶
Index ¶
- type Channel
- func (c *Channel) GetLevel() log.Level
- func (c *Channel) GetLogger() log.Logger
- func (c *Channel) GetName() string
- func (c *Channel) GetOutput() Output
- func (c *Channel) GetPersistentKV() []interface{}
- func (c *Channel) Level(level log.Level) *Channel
- func (c *Channel) NewLogger(kvs ...interface{}) log.Logger
- func (c *Channel) Option(opts *Options) *Channel
- func (c *Channel) Output(o Output) *Channel
- func (c *Channel) PersistentKV(kvs ...interface{}) *Channel
- type Manager
- func (m *Manager) AddChannel(names ...string)
- func (m *Manager) Get(names ...string) log.Logger
- func (m *Manager) Reassign()
- func (m *Manager) SetLevel(level log.Level) *Manager
- func (m *Manager) SetOption(opts *Options) *Manager
- func (m *Manager) SetOutput(output Output) *Manager
- func (m *Manager) SetPersistentKV(kvs ...interface{}) *Manager
- type ManagerOption
- type Options
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannel ¶
func (*Channel) GetPersistentKV ¶
func (c *Channel) GetPersistentKV() []interface{}
func (*Channel) PersistentKV ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(defaultChannelName string, opts ...ManagerOption) *Manager
func (*Manager) AddChannel ¶
func (*Manager) SetPersistentKV ¶
type ManagerOption ¶
type ManagerOption func(m *Manager)
func WithChannelOption ¶
func WithChannelOption(opts *Options) ManagerOption
func WithLevel ¶
func WithLevel(level log.Level) ManagerOption
func WithOutput ¶
func WithOutput(output Output) ManagerOption
func WithPersistentKV ¶
func WithPersistentKV(kvs ...interface{}) ManagerOption
type Options ¶
type Options struct { Directory string // default: log Ext string // MaxAge is the maximum number of days to retain old log files based on the // timestamp encoded in their filename. Note that a day is defined as 24 // hours and may not exactly correspond to calendar days due to daylight // savings, leap seconds, etc. The default is not to remove old log files // based on age. MaxAge int // MaxSize is the maximum size in megabytes of the log file before it gets rotated. // It defaults to 100 megabytes. unit: megabytes MaxSize int // MaxBackups is the maximum number of old log files to retain. The default is to retain all old log files MaxBackups int // Compress determines if the rotated log files should be compressed using gzip. // The default is not to perform compression. Compress bool }
Click to show internal directories.
Click to hide internal directories.