logger

package
v0.12.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log       *zap.Logger
	LogConfig *zap.Config
	Audit     *zap.Logger
)
View Source
var (
	CompatibleLogger *log.Logger
)

Functions

func Flags added in v0.12.0

func Flags(fs *pflag.FlagSet)

func Init

func Init(conf *configv2.Logger) error

func InitByFlags added in v0.12.0

func InitByFlags() error

InitByFlags constructs the logger. The logger configuration will bring from command line arguments. Thus, you must define the flag by Flags and parse arguments before calling this.

func OverrideKlog added in v0.9.0

func OverrideKlog(conf *configv2.Logger) error

func TypeOf added in v0.12.0

func TypeOf(key string, val interface{}) zap.Field

TypeOf constructs a field of zap. value will be convert to type name.

func WithRequestId added in v0.7.0

func WithRequestId(ctx context.Context) zap.Field

Types

This section is empty.

Jump to

Keyboard shortcuts

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