dlog

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 5 Imported by: 0

README

dlog

Documentation

Index

Constants

View Source
const (
	DebugLevel  = zapcore.DebugLevel
	InfoLevel   = zapcore.InfoLevel
	WarnLevel   = zapcore.WarnLevel
	ErrorLevel  = zapcore.ErrorLevel
	DPanicLevel = zapcore.DPanicLevel
	PanicLevel  = zapcore.PanicLevel
	FatalLevel  = zapcore.FatalLevel
)

Variables

This section is empty.

Functions

func New

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

Types

type Option

type Option func(*logger)

func WithAsyncWrite

func WithAsyncWrite(asyncWrite bool) Option

func WithBufferSize

func WithBufferSize(bufferSize int) Option

func WithClock

func WithClock(clock filerotator.Clock) Option

func WithFlushInterval

func WithFlushInterval(flushInterval time.Duration) Option

func WithMaxAge

func WithMaxAge(maxAge time.Duration) Option

func WithMaxBackups

func WithMaxBackups(maxBackups uint) Option

func WithOutputType

func WithOutputType(outputType OutputType) Option

func WithRotateType

func WithRotateType(rotateType filerotator.RotateType) Option

func WithRotationSize

func WithRotationSize(rotationSize int64) Option

func WithRotationTime

func WithRotationTime(rotationTime time.Duration) Option
func WithSymlink(file string) Option

type OutputType

type OutputType int
const (
	OutputNone OutputType = iota
	OutputFile
	OutputConsole
	OutputBoth
)

Jump to

Keyboard shortcuts

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