flog

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(format string, args ...any)

func GetCallStackInfo

func GetCallStackInfo(skip int) (string, int, string)

GetCallStackInfo return fileName, lineNo, funName

func GetGoroutineID

func GetGoroutineID() uint64

func Infof

func Infof(format string, args ...any)

func SetLoggerFactory

func SetLoggerFactory(factory LoggerFactory)

func WarnExWithPosf

func WarnExWithPosf(fileName string, lineNo int, funName string, format string, args ...any)

func Warnf added in v0.0.7

func Warnf(format string, args ...any)

Types

type ILogger

type ILogger interface {
	Debugf(format string, args ...any)
	Infof(format string, args ...any)
	Warnf(format string, args ...any)
	WarnExWithPosf(fileName string, lineNo int, funName string, format string, args ...any)
}

ILogger in go-library, provide WarnExWithPosf, so can used in verify, user should call `SetLoggerFactory` to customize the logger

type LoggerFactory

type LoggerFactory func() ILogger

LoggerFactory is the factory method for creating logger used for the specified package.

Jump to

Keyboard shortcuts

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