zaplog

package module
v0.0.0-...-b4dad9e Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewZapLogger

func NewZapLogger(options ...Option) *zap.Logger

Types

type Option

type Option func(o *option)

func WithCallDepth

func WithCallDepth(depth int) Option

func WithMaxFileSize

func WithMaxFileSize(size int) Option

单个日志文件大小(单位:MB)

func WithMaxSaveDuration

func WithMaxSaveDuration(day int) Option

文件最多保留多长时间(单位:Day)

func WithMinLogLevel

func WithMinLogLevel(lv Level) Option

最低打印日志级别

func WithOutJsonCodec

func WithOutJsonCodec() Option

输出jason格式

func WithSyncConsole

func WithSyncConsole() Option

是否同步控制台

func WithSyncFile

func WithSyncFile(file string) Option

同步写入文件

func WithTimeFormat

func WithTimeFormat(format string) Option

时间格式

Jump to

Keyboard shortcuts

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