log

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctx

func Ctx(ctx context.Context) *zerolog.Logger

Ctx returns the logger for the passed context

func Debug

func Debug(v ...interface{})

Debug implements logrus Debug interface

func Debugf

func Debugf(format string, v ...interface{})

Debugf implements logrus Debugf interface

func Error

func Error(v ...interface{})

Error implements logrus Error interface

func Errorf

func Errorf(format string, v ...interface{})

Errorf implements logrus Errorf interface

func Fatal

func Fatal(v ...interface{})

Fatal implements log Fatal interface

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf implements log Fatalf interface

func Fatalln

func Fatalln(v ...interface{})

Fatalln implements log Fatalln interface

func Handler

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

Handler is a middleware that handles all of the logging aspects of any incoming http request

func Info

func Info(v ...interface{})

Info implements logrus Info interface

func Infof

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

Infof implements logrus Infof interface

func Logger

func Logger() *zerolog.Logger

Logger returns the current logger instance

func Print

func Print(v ...interface{})

Print implements log Print interface

func Printf

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

Printf implements log Printf interface

func Println

func Println(v ...interface{})

Println implements log Println interface

func ProxyAwareRemote

func ProxyAwareRemote(r *http.Request) string

ProxyAwareRemote return the most likely remote address

func Req

func Req(r *http.Request) *zerolog.Logger

Req returns the logger for the passed request

func RequestID

func RequestID(r *http.Request) string

RequestID returns a unique request id or an empty string if there is none

func RequestIDFromContext

func RequestIDFromContext(ctx context.Context) string

RequestIDFromContext returns a unique request id or an empty string if there is none

func Stack

func Stack(ctx context.Context)

Stack prints the stack of the calling goroutine

func Warn

func Warn(v ...interface{})

Warn implements logrus Warn interface

func Warnf

func Warnf(format string, v ...interface{})

Warnf implements logrus Warnf interface

func WithContext

func WithContext(ctx context.Context) context.Context

WithContext returns context with enabled logger. This overwrites a logger that is set on the context already use this if you are not inside a request context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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