log

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FormatText format log text
	FormatText = "text"
	// FormatJSON format log json
	FormatJSON = "json"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

Debug output log

func Error

func Error(msg string, fields ...zap.Field)

Error output log

func Fatal

func Fatal(msg string, fields ...zap.Field)

Fatal output log

func Info

func Info(msg string, fields ...zap.Field)

Info output log

func InitLog

func InitLog(opts ...Option)

InitLog conf

func Panic

func Panic(msg string, fields ...zap.Field)

Panic output panic

func SetLevel

func SetLevel(level string)

func Warn

func Warn(msg string, fields ...zap.Field)

Warn output log

Types

type Option

type Option func(*logConfig)

Option function option

func Format

func Format(format string) Option

Format log json or text

func Level

func Level(level string) Option

Level set log level default info

Jump to

Keyboard shortcuts

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