logger

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitZap

func InitZap(opts ...OptionFunc)

InitZap logger with default writer to stdout

func Log

func Log(level zapcore.Level, message string, context string, scope string)

Log func

func LogE

func LogE(message string)

LogE error

func LogEf

func LogEf(format string, i ...interface{})

LogEf error with format

func LogGreen

func LogGreen(str string)

LogGreen log with green color

func LogI

func LogI(message string)

LogI info

func LogIf

func LogIf(format string, i ...interface{})

LogIf info with format

func LogRed

func LogRed(str string)

LogRed log with red color

func LogWithDefer

func LogWithDefer(str string) (deferFunc func())

LogWithDefer return defer func for status

func LogWithField added in v1.9.3

func LogWithField(level zapcore.Level, fields map[string]interface{})

LogWithField func

func LogYellow

func LogYellow(str string)

LogYellow log with yellow color

Types

type Option added in v1.9.3

type Option struct {
	MultiWriter []io.Writer
}

Option for init logger option

type OptionFunc added in v1.9.3

type OptionFunc func(*Option)

OptionFunc func

func OptionAddWriter added in v1.9.3

func OptionAddWriter(w io.Writer) OptionFunc

OptionAddWriter option func

Jump to

Keyboard shortcuts

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