Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2021 Changes in this version + type AsyncOption func(*AsyncOptions) + func WithDropLog(b bool) AsyncOption + func WithLogQueueSize(n int) AsyncOption + func WithWriteLogInterval(n int) AsyncOption + func WithWriteLogSize(n int) AsyncOption + type AsyncOptions struct + DropLog bool + LogQueueSize int + WriteLogInterval int + WriteLogSize int + type AsyncRollWriter struct + func NewAsyncRollWriter(logger io.Writer, opt ...AsyncOption) *AsyncRollWriter + func (w *AsyncRollWriter) Close() error + func (w *AsyncRollWriter) Sync() error + func (w *AsyncRollWriter) Write(data []byte) (int, error) + type Option func(*Options) + func WithCompress(b bool) Option + func WithMaxAge(n int) Option + func WithMaxBackups(n int) Option + func WithMaxSize(n int) Option + func WithRotationTime(s string) Option + type Options struct + Compress bool + MaxAge int + MaxBackups int + MaxSize int64 + TimeFormat string + type RollWriter struct + func NewRollWriter(filePath string, opt ...Option) (*RollWriter, error) + func (w *RollWriter) Close() error + func (w *RollWriter) Write(v []byte) (n int, err error)