zaplog

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

New ... alias for NewDefaultLogger

Functions

func NewDefaultLogger

func NewDefaultLogger(opts ...Option) *zap.Logger

NewDefaultLogger ... 创建基于 zap 的日志实例, 并设置 zap 全局默认日志

Types

type Option

type Option func(config *zap.Config)

func WithLevel

func WithLevel(level string) Option

WithLevel ... 配置 zap-log 默认的日志等级

func WithOutputPaths

func WithOutputPaths(outputPaths []string) Option

Jump to

Keyboard shortcuts

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