logger

package
v0.0.0-...-8c5667c Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 12 Imported by: 78

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReportInterval = time.Second * 5

The interval between logging the number of actions/sec

Functions

func Tick

func Tick(name string)

func TickN

func TickN(name string, number int)

Types

type BugsnagLogger

type BugsnagLogger struct {
	loggo.Logger
}

BugsnagLogger used in bugsnag to ensure panics are written to the logger as well as bugsnag

func GetBugsnagLogger

func GetBugsnagLogger(name string) *BugsnagLogger

GetBugsnagLogger builds a wrapper for loggo which can be used by bugsnag.

func (*BugsnagLogger) Printf

func (lw *BugsnagLogger) Printf(format string, v ...interface{})

Printf used in bugsnag to ensure panics are written to the logger as well as bugsnag

type Logger

type Logger struct {
	loggo.Logger
}

Logger wrapper for the internal logger with some extra helpers

func GetLogger

func GetLogger(name string) *Logger

GetLogger builds a ninja logger with the given name

func (*Logger) FatalError

func (l *Logger) FatalError(err error, msg string)

FatalError This notifies bugsnag and logs the error then quits.

func (*Logger) FatalErrorf

func (l *Logger) FatalErrorf(err error, msg string, args ...interface{})

FatalErrorf This notifies bugsnag and logs the error based on the args then quits

func (*Logger) Fatalf

func (l *Logger) Fatalf(msg string, args ...interface{})

Fatalf This notifies bugsnag and logs the error based on the args then quits

func (*Logger) HandleError

func (l *Logger) HandleError(err error, msg string)

HandleError This notifies bugsnag and logs the error.

func (*Logger) HandleErrorf

func (l *Logger) HandleErrorf(err error, msg string, args ...interface{})

HandleErrorf This notifies bugsnag and logs the error based on the args.

Jump to

Keyboard shortcuts

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