log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: AGPL-3.0 Imports: 7 Imported by: 87

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug sends a debug level log message

func Debugf

func Debugf(template string, args ...interface{})

Debugf sends a formatted debug level log message

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

Debugw sends a key-value formatted debug level log message

func Error

func Error(args ...interface{})

Error sends an error level log message

func Errorf

func Errorf(template string, args ...interface{})

Errorf sends a formatted error level log message

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

Errorw sends a key-value formatted error level log message

func Fatal

func Fatal(args ...interface{})

Fatal sends a fatal level log message

func Fatalf

func Fatalf(template string, args ...interface{})

Fatalf sends a formatted fatal level log message

func Fatalw

func Fatalw(msg string, keysAndValues ...interface{})

Fatalw sends a key-value formatted fatal level log message

func FormatProto

func FormatProto(arg protoreflect.ProtoMessage) string

func Info

func Info(args ...interface{})

Info sends an info level log message

func Infof

func Infof(template string, args ...interface{})

Infof sends a formatted info level log message

func Infow

func Infow(msg string, keysAndValues ...interface{})

Infow sends a key-value formatted info level log message

func Init

func Init(logLevel string, output string)

Init initializes the logger. Output can be either "stdout/stderr/filePath"

func Logger

func Logger() *zap.SugaredLogger

func SetFileErrorLog

func SetFileErrorLog(path string) error

SetFileErrorLog if set writes the Warning and Error messages to a file.

func Warn

func Warn(args ...interface{})

Warn sends a warn level log message

func Warnf

func Warnf(template string, args ...interface{})

Warnf sends a formatted warn level log message

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Warnw sends a key-value formatted warn level log message

Types

This section is empty.

Jump to

Keyboard shortcuts

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