log

package
v1.5.21 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger *zap.Logger
	Sugar  *zap.SugaredLogger
)

Functions

func InitLogger

func InitLogger(serviceName string, opt ...Option)

InitLogger 初始化Log日志记录

Types

type Option added in v1.5.19

type Option func(*zap.Config)

func SetLogLevel added in v1.5.19

func SetLogLevel(l zapcore.Level) Option

SetLogLevel alters the logging level.

func SetOutputPath added in v1.5.19

func SetOutputPath(outputPath OutPut) Option

SetOutputPath Set log output Path

type OutPut added in v1.5.19

type OutPut int
const (
	ConsoleOutPut OutPut = iota + 1
	FileOutPut
	ConsoleAndFileOutPut
)

Jump to

Keyboard shortcuts

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