zlog

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputType_None outputType = iota
	OutputType_Both
	OutputType_File
	OutputType_Console
)

Variables

This section is empty.

Functions

func New

func New(file string, opts ...Option) (*zap.Logger, error)

func ParseLevel

func ParseLevel(level string) zapcore.Level

func ParseOutputType

func ParseOutputType(outputType string) outputType

func ParseRotationType

func ParseRotationType(rotateType string) filerotator.RotateType

Types

type Option

type Option func(*config)

func AsyncWrite

func AsyncWrite(asyncWrite bool) Option

func BufferSize

func BufferSize(bufferSize int) Option

func Clock

func Clock(clock filerotator.Clock) Option

func FlushInterval

func FlushInterval(flushInterval time.Duration) Option

func Level

func Level(level zapcore.Level) Option

func MaxAge

func MaxAge(maxAge time.Duration) Option

func MaxBackups

func MaxBackups(maxBackups uint) Option

func OutputType

func OutputType(outputType outputType) Option

func RotateType

func RotateType(rotateType filerotator.RotateType) Option

func RotationSize

func RotationSize(rotationSize int64) Option

func RotationTime

func RotationTime(rotationTime time.Duration) Option
func Symlink(symlink string) Option

func ZapOpts

func ZapOpts(zapOpts ...zap.Option) Option

Jump to

Keyboard shortcuts

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