logging

package
v0.0.0-...-7a6a509 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RemoteIPField  = "remote_ip"
	TimeField      = "time"
	HostField      = "host"
	RequestField   = "request"
	UserAgentField = "user_agent"
	StatusField    = "status"
	SizeField      = "size"
	RequestIDField = "request_id"
)
View Source
const (
	HeaderVcapRequestID = "X-Vcap-Request-Id"
	MaxSizeLimit        = 255
)

Variables

This section is empty.

Functions

func FromContext

func FromContext(c echo.Context) *zap.Logger

func NewEchoZapLogger

func NewEchoZapLogger(baseLogger *zap.Logger) echo.MiddlewareFunc

ZapLogger is a middleware and zap to provide an "access log" like logging for each request.

func NewTimingMiddleware

func NewTimingMiddleware() echo.MiddlewareFunc

func NewVcapRequestID

func NewVcapRequestID() echo.MiddlewareFunc

func Setup

func Setup(config *config.CfAPIConfig) error

Types

type BoilLogger

type BoilLogger struct {
	RedactParams bool
	// contains filtered or unexported fields
}

func NewBoilLogger

func NewBoilLogger(redactParams bool, logger *zap.Logger) *BoilLogger

func (*BoilLogger) Write

func (b *BoilLogger) Write(data []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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