modlog

package
v0.0.0-...-4514fd0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerProvider

func LoggerProvider() api.LoggerProvider

LoggerProvider returns logging provider for SDK logger

func VerifyBasicLogging

func VerifyBasicLogging(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, buf *bytes.Buffer, verifyCustom bool, moduleName string)

VerifyBasicLogging utility func which does job calling and verifying basic log level functions - DEBUG, INFO, ERROR, WARNING

func VerifyCriticalLoggings

func VerifyCriticalLoggings(t *testing.T, level api.Level, loggerFunc fn, loggerFuncf fnf, buf fmt.Stringer)

VerifyCriticalLoggings utility func which does job calling and verifying CRITICAL log level functions - PANIC

Types

type Log

type Log struct {
	// contains filtered or unexported fields
}

Log is a standard SDK logger implementation

func (*Log) Debug

func (l *Log) Debug(args ...interface{})

Debug calls go log.Output. Arguments are handled in the manner of fmt.Print.

func (*Log) Debugf

func (l *Log) Debugf(format string, args ...interface{})

Debugf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

func (*Log) Error

func (l *Log) Error(args ...interface{})

Error calls go log.Output. Arguments are handled in the manner of fmt.Print.

func (*Log) Errorf

func (l *Log) Errorf(format string, args ...interface{})

Errorf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

func (*Log) Fatal

func (l *Log) Fatal(args ...interface{})

Fatal is CRITICAL log followed by a call to os.Exit(1).

func (*Log) Fatalf

func (l *Log) Fatalf(format string, args ...interface{})

Fatalf is CRITICAL log formatted followed by a call to os.Exit(1).

func (*Log) Info

func (l *Log) Info(args ...interface{})

Info calls go log.Output. Arguments are handled in the manner of fmt.Print.

func (*Log) Infof

func (l *Log) Infof(format string, args ...interface{})

Infof calls go log.Output. Arguments are handled in the manner of fmt.Printf.

func (*Log) Panic

func (l *Log) Panic(args ...interface{})

Panic is CRITICAL log followed by a call to panic()

func (*Log) Panicf

func (l *Log) Panicf(format string, args ...interface{})

Panicf is CRITICAL log formatted followed by a call to panic()

func (*Log) Warn

func (l *Log) Warn(args ...interface{})

Warn calls go log.Output. Arguments are handled in the manner of fmt.Print.

func (*Log) Warnf

func (l *Log) Warnf(format string, args ...interface{})

Warnf calls go log.Output. Arguments are handled in the manner of fmt.Printf.

type Provider

type Provider struct {
}

Provider is the default logger implementation

func (*Provider) GetLogger

func (p *Provider) GetLogger(module string) api.Logger

GetLogger returns SDK logger implementation

Jump to

Keyboard shortcuts

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