fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/core/logging/modlog Index | Files

package modlog

import "github.com/hyperledger/fabric-sdk-go/pkg/core/logging/modlog"

Index

Package Files

modlog.go testVerifyUtils.go

func GetLevel Uses

func GetLevel(module string) api.Level

GetLevel - getting log level for given module

func HideCallerInfo Uses

func HideCallerInfo(module string, level api.Level)

HideCallerInfo - Do not show caller info in log lines for given log level

func InitLogger Uses

func InitLogger(l api.LoggerProvider)

InitLogger sets custom logger which will be used over deflogger. It is required to call this function before making any loggings.

func IsEnabledFor Uses

func IsEnabledFor(module string, level api.Level) bool

IsEnabledFor - Check if given log level is enabled for given module

func LoggerProvider Uses

func LoggerProvider() api.LoggerProvider

LoggerProvider returns logging provider for SDK logger

func SetLevel Uses

func SetLevel(module string, level api.Level)

SetLevel - setting log level for given module

func ShowCallerInfo Uses

func ShowCallerInfo(module string, level api.Level)

ShowCallerInfo - Show caller info in log lines for given log level

func VerifyBasicLogging Uses

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 Uses

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

type Log Uses

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

Log is a standard SDK logger implementation

func (*Log) ChangeOutput Uses

func (l *Log) ChangeOutput(output io.Writer)

ChangeOutput for changing output destination for the logger.

func (*Log) Debug Uses

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

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

func (*Log) Debugf Uses

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

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

func (*Log) Debugln Uses

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

Debugln calls go log.Output. Arguments are handled in the manner of fmt.Println.

func (*Log) Error Uses

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

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

func (*Log) Errorf Uses

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

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

func (*Log) Errorln Uses

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

Errorln calls go log.Output. Arguments are handled in the manner of fmt.Println.

func (*Log) Fatal Uses

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

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

func (*Log) Fatalf Uses

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

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

func (*Log) Fatalln Uses

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

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

func (*Log) Info Uses

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

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

func (*Log) Infof Uses

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

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

func (*Log) Infoln Uses

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

Infoln calls go log.Output. Arguments are handled in the manner of fmt.Println.

func (*Log) Panic Uses

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

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

func (*Log) Panicf Uses

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

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

func (*Log) Panicln Uses

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

Panicln is CRITICAL log ln followed by a call to panic()

func (*Log) Print Uses

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

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

func (*Log) Printf Uses

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

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

func (*Log) Println Uses

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

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

func (*Log) Warn Uses

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

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

func (*Log) Warnf Uses

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

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

func (*Log) Warnln Uses

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

Warnln calls go log.Output. Arguments are handled in the manner of fmt.Println.

type Provider Uses

type Provider struct {
}

Provider is the default logger implementation

func (*Provider) GetLogger Uses

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

GetLogger returns SDK logger implementation

Package modlog imports 15 packages (graph) and is imported by 3 packages. Updated 2019-04-10. Refresh now. Tools for package owners.