logging

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogCTXKey logctxKeyT = "loggingContextKey"

Functions

func CheckFatal

func CheckFatal(err error)

CheckFatal exits the process if err != nil

func InjectHandler

func InjectHandler(mainLog Interface) func(http.Handler) http.Handler

func Logger

func Logger(name string) kitlog.Logger

Logger returns an Entry where the module field is set to name

func NewContext

func NewContext(ctx context.Context, log Interface) context.Context

func RecoveryHandler

func RecoveryHandler() func(http.Handler) http.Handler

func SetCloseChan

func SetCloseChan(c chan<- os.Signal)

func SetupLogging

func SetupLogging(w io.Writer)

SetupLogging will initialize the logger backend and set the flags.

func Writer

func Writer(unit string, l kitlog.Logger) io.WriteCloser

Types

type Interface

type Interface kitlog.Logger

func FromContext

func FromContext(ctx context.Context) Interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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