logger

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	*log.Logger
	*errorreporting.Client
}

Log is a wrapper on the stdlib log pkg.

func New

func New(errorClient *errorreporting.Client) *Log

New returns an initialized Log with defaults setup.

func (*Log) ErrReport added in v0.4.0

func (log *Log) ErrReport(err error)

func (*Log) FatalIfErr

func (log *Log) FatalIfErr(err error)

FatalIfErr checks if the error is nil and panics if not nil.

func (*Log) LogIfErr

func (log *Log) LogIfErr(err error) error

LogIfErr checks if the error is nil and logs it if not nil.

Jump to

Keyboard shortcuts

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