log

package
v0.22.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package log implements API-related logging helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnabledResponse

func EnabledResponse(rw http.ResponseWriter, v interface{})

EnabledResponse log the response object if it implements the EnableLogger interface.

func Error

func Error(rw http.ResponseWriter, err error)

Error adds to the response writer the given error if it implements logging.ResponseLogger. If it does not implement it, then writes the error using the log package.

Types

type StackTracedError

type StackTracedError interface {
	error

	StackTrace() errors.StackTrace
}

StackTracedError is the set of errors implementing the StackTrace function.

Errors implementing this interface have their stack traces logged when passed to the Error function of this package.

Jump to

Keyboard shortcuts

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