logger

package
v0.0.0-...-9ae6259 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

FailOnError prints out message if fail occurs and exits with code 1

func LogOnError

func LogOnError(err error, msg string)

LogOnError prints out message if fail occurs

Types

type CustomLogger

type CustomLogger interface {
	FailOnError(err error, msg string)
	LogOnError(err error, msg string)
}

CustomLogger replaces itself logger with user-provided one

func New

func New(lg *log.Logger) CustomLogger

New creates a instance of CustomLogger and returns

Jump to

Keyboard shortcuts

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