logger

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 14 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 flagSet](v FS)

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() 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