log

package
v0.0.0-...-2c24670 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package log contains various tools for logging information and errors during runtime. It is an extension of the github.com/sirupsen/logrus package.

Index

Constants

This section is empty.

Variables

View Source
var (
	//Print is an alias for log.Print in logrus
	Print = log.Print

	//Fatalf is an alias for log.Fatalf in logrus
	Fatalf = log.Fatalf

	//Fatal is an alias for log.Fatal in logrus
	Fatal = log.Fatal

	//Println is an alias for log.Println in logrus
	Println = log.Println

	//Info is an alias for log.Info in logrus
	Info = log.Info

	//Warn is an alias for log.Warn in logrus
	Warn = log.Warn

	//Warnf is an alias for log.Warnf in logrus
	Warnf = log.Warnf
)
View Source
var Logger = log.StandardLogger()

Functions

func Check

func Check(err error)

Check calls Fatal on an error if it is non-nil.

func ErrorWrap

func ErrorWrap(err error, msg string)

func FatalWrap

func FatalWrap(err error, msg string)

FatalWrap wraps the error using errors.wrap, then calls log.fatalf

func Infof

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

Infof calls spew.Sprintf on the arguments, then logs it at the info level

func Infofln

func Infofln(format string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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