log

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(t string, args ...interface{})

Debugf logs a debug level log message

func Errorf

func Errorf(t string, args ...interface{})

Errorf logs an error level log message

func Infof

func Infof(t string, args ...interface{})

Infof logs an info level log message

Types

type Logger

type Logger interface {
	Debugf(string, ...interface{})
	Infof(string, ...interface{})
	Errorf(string, ...interface{})
}

Logger interface should be implemented by the logging library you wish to use

var Log Logger

Log can be assigned a proper logger, such as logrus configured to your liking.

type StdLog

type StdLog struct {
	Logger
}

StdLog is a simplistic logger for rig

func (*StdLog) Debugf

func (l *StdLog) Debugf(t string, args ...interface{})

Debugf prints a debug level log message

func (*StdLog) Errorf

func (l *StdLog) Errorf(t string, args ...interface{})

Errorf prints an error level log message

func (*StdLog) Infof

func (l *StdLog) Infof(t string, args ...interface{})

Infof prints an info level log message

Jump to

Keyboard shortcuts

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