log

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 82

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger is the global variable for logging
	Logger *zap.SugaredLogger
)

Functions

func Fatal

func Fatal(err error)

Fatal for logging fatal errors

func InitLogger

func InitLogger(debug, disable bool) (err error)

InitLogger initialize the logger variable

func NewLogger added in v0.3.0

func NewLogger(debug, disable bool) (*zap.SugaredLogger, error)

NewLogger is the factory method to return the instance of logger

func String added in v0.45.0

func String(key, val string) zap.Field

Types

type PrefixedLogger added in v0.48.0

type PrefixedLogger struct {
	Name string
}

func (*PrefixedLogger) Write added in v0.48.0

func (d *PrefixedLogger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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