logger

package
v0.0.0-...-d4c9710 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifySentry

func NotifySentry(re ReportableError)

Types

type Logger

type Logger interface {
	Log(fields map[string]interface{})
	LogFromClientRequest(fields map[string]interface{}, req *http.Request)
	LogFromBackendRequest(fields map[string]interface{}, req *http.Request)
}

func New

func New(output interface{}) (logger Logger, err error)

New creates a new Logger. The output variable sets the destination to which log data will be written. This can be either an io.Writer, or a string. With the latter, this is either one of "STDOUT" or "STDERR", or the path to the file to log to.

type RecoveredError

type RecoveredError struct {
	ErrorMessage string
}

func (RecoveredError) Error

func (re RecoveredError) Error() string

type ReportableError

type ReportableError struct {
	Error    error
	Request  *http.Request
	Response *http.Response
}

Jump to

Keyboard shortcuts

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