Documentation
¶
Index ¶
Constants ¶
View Source
const ( Name = "zap" DefaultPath = "log/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Option ¶
type Option func(opt *ZapComponent)
func WithConfig ¶ added in v1.5.0
func WithConfig(conf config.ConfigMate) Option
type ToyBoxLogger ¶ added in v1.5.1
func NewLogger ¶ added in v1.5.2
func NewLogger(conf config.ConfigMate) ToyBoxLogger
type ZapComponent ¶
type ZapComponent struct {
Debug string `toml:"debug"`
Info string `toml:"info"`
Warn string `toml:"warn"`
Err string `toml:"err"`
MaxSize int `toml:"max_size"`
MaxAge int `toml:"max_age"`
MaxBackup int `toml:"max_backup"`
Compress bool `toml:"compress"`
Json bool `toml:"json"`
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *ZapComponent
func (*ZapComponent) Name ¶
func (zc *ZapComponent) Name() string
func (*ZapComponent) NewLogger ¶ added in v1.5.1
func (zc *ZapComponent) NewLogger(server_name string) Logger
Click to show internal directories.
Click to hide internal directories.