logger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeFormat           = "15:04:05.000"
	DefaultCallerSkipFrameCount = 3 // set to 3 because logger wrapped in logger.go

	NoColor   = true
	UseCaller = false // for developer, if you want to expose line of code of caller
)

Variables

This section is empty.

Functions

func AddVerboseFlag added in v1.3.0

func AddVerboseFlag(cmd ...*cobra.Command)

AddVerboseFlag set flag --log-debug

func Debug

func Debug(args ...interface{})

Debug function

func DebugWithFields

func DebugWithFields(msg string, kv map[string]interface{})

DebugWithFields function

func Debugf

func Debugf(format string, v ...interface{})

Debugf function

func Debugln

func Debugln(args ...interface{})

Debugln function

func Error

func Error(args ...interface{})

Error function

func ErrorE added in v1.2.9

func ErrorE(err error)

Error function

func ErrorWithFields

func ErrorWithFields(msg string, kv map[string]interface{})

ErrorWithFields function

func Errorf

func Errorf(format string, v ...interface{})

Errorf function

func Errorln

func Errorln(args ...interface{})

Errorln function

func Errors

func Errors(err error)

Errors function to log errors package

func Fatal

func Fatal(args ...interface{})

Fatal function

func FatalWithFields

func FatalWithFields(msg string, kv map[string]interface{})

FatalWithFields function

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf function

func Fatalln

func Fatalln(args ...interface{})

Fatalln function

func Info

func Info(args ...interface{})

Info function

func InfoWithFields

func InfoWithFields(msg string, kv map[string]interface{})

InfoWithFields function

func Infof

func Infof(format string, v ...interface{})

Infof function

func Infoln

func Infoln(args ...interface{})

Infoln function

func Print

func Print(v ...interface{})

Print standard print with debug mode validation

func PrintLogs

func PrintLogs()

PrintLogs print all stacked log

func Printf

func Printf(format string, v ...interface{})

Printf standard printf with debug mode validation

func Println

func Println(v ...interface{})

Println standard println with debug mode validation

func Warn

func Warn(args ...interface{})

Warn function

func WarnWithFields

func WarnWithFields(msg string, kv map[string]interface{})

WarnWithFields function

func Warnf

func Warnf(format string, v ...interface{})

Warnf function

func Warnln

func Warnln(args ...interface{})

Warnln function

Types

This section is empty.

Jump to

Keyboard shortcuts

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