dateformat

package
v0.0.0-...-237b7d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

dateformat @author LanguageY++2013 2023/5/10 16:33 @company soulgame

dateformat @author LanguageY++2013 2023/5/10 09:36 @company soulgame

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBufferedWriteSyncer

func NewBufferedWriteSyncer(cfg Configure, opts ...BufferedOption) *zapcore.BufferedWriteSyncer

Types

type BufferedOption

type BufferedOption func(b *zapcore.BufferedWriteSyncer)

func WithBufferSize

func WithBufferSize(size int) BufferedOption

func WithFlushInterval

func WithFlushInterval(flushInterval time.Duration) BufferedOption

type Configure

type Configure struct {
	//Dir 日志文件目录
	Dir string `json:"dir"`

	//Prefix 文件名前缀
	Prefix string `json:"prefix"`

	//MaxAge 日志保留天数
	MaxAge int `json:"maxage"`
}

type Logger

type Logger struct {
	Configure
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(cfg Configure) *Logger

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Sync

func (l *Logger) Sync() error

func (*Logger) Write

func (l *Logger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL