logging

package
v0.0.0-...-9137930 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VerboseLogLevel defines verbose log level as 10
	VerboseLogLevel glog.Level = 10
)

Variables

This section is empty.

Functions

func InitializeLogger

func InitializeLogger(logVerbose bool)

InitializeLogger initializes the base logger

func InitializeMetricExporter

func InitializeMetricExporter()

InitializeMetricExporter initializes the metric exporter logger

Types

type BaseLogger

type BaseLogger struct {
	Logger *zap.SugaredLogger
}

BaseLogger is a common knative test files logger.

func GetContextLogger

func GetContextLogger(context string) *BaseLogger

GetContextLogger creates a Named logger (https://godoc.org/go.uber.org/zap#Logger.Named) using the provided context as a name. This will also register the logger as a metric exporter, which is unfortunately global, so calling `GetContextLogger` will have the side effect of changing the context in which all metrics are logged from that point forward.

func (*BaseLogger) Debug

func (b *BaseLogger) Debug(args ...interface{})

Debug logs a debug message.

func (*BaseLogger) Debugf

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

Debugf logs a templated debug message.

func (*BaseLogger) Error

func (b *BaseLogger) Error(args ...interface{})

Error logs an error message.

func (*BaseLogger) Errorf

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

Errorf logs a templated error message.

func (*BaseLogger) Fatal

func (b *BaseLogger) Fatal(args ...interface{})

Fatal logs a fatal message.

func (*BaseLogger) Fatalf

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

Fatalf logs a templated fatal message.

func (*BaseLogger) Info

func (b *BaseLogger) Info(args ...interface{})

Info logs an info message.

func (*BaseLogger) Infof

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

Infof logs a templated message.

Jump to

Keyboard shortcuts

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