log

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Global *logrus.Entry

Functions

func Init

func Init(level string, fmtname string)

Init sets up the default log level and log output format on global logrus instance. Subsequent calls to this function will not propagate new configuration to already existing loggers.

func New

func New(subsystem string) *logrus.Entry

New creates a new logrus instance with preconfigured log level and output format and returns the entry object with sybsystem name configured on it as a field. All output from the entry object will contain the subsystem name on key "subsystem"

func NewSrvLogger

func NewSrvLogger() srvlog.Logger

NewSrvLogger returns a new logger that is compatible with go-control-plane server.

Types

type ServerLog

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

ServerLog implements the Logger interface for go-control-plane/pkg/log.Logger. It wraps an instance of *logrus.Entry to facilitate levelled and structured logs from go-control-plane server.

func (*ServerLog) Errorf

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

func (*ServerLog) Infof

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

Jump to

Keyboard shortcuts

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