Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncOption ¶
type AsyncOption func(*AsyncOptions)
func WithDropLog ¶
func WithDropLog(b bool) AsyncOption
func WithLogQueueSize ¶
func WithLogQueueSize(n int) AsyncOption
func WithWriteLogInterval ¶
func WithWriteLogInterval(n int) AsyncOption
func WithWriteLogSize ¶
func WithWriteLogSize(n int) AsyncOption
type AsyncOptions ¶
type AsyncRollWriter ¶
type AsyncRollWriter struct {
// contains filtered or unexported fields
}
func NewAsyncRollWriter ¶
func NewAsyncRollWriter(logger io.Writer, opt ...AsyncOption) *AsyncRollWriter
NewAsyncRollWriter
func (*AsyncRollWriter) Close ¶
func (w *AsyncRollWriter) Close() error
func (*AsyncRollWriter) Sync ¶
func (w *AsyncRollWriter) Sync() error
type Option ¶
type Option func(*Options)
Option 调用参数工具函数
func WithRotationTime ¶
WithRotationTime set time format(如:%Y%m%d)
type RollWriter ¶
type RollWriter struct {
// contains filtered or unexported fields
}
func NewRollWriter ¶
func NewRollWriter(filePath string, opt ...Option) (*RollWriter, error)
func (*RollWriter) Close ¶
func (w *RollWriter) Close() error
Click to show internal directories.
Click to hide internal directories.