logging
logging
import "github.com/cloudfoundry/go-cf-api/internal/logging"
Index
- Constants
- Variables
- func FromContext(c echo.Context) *zap.Logger
- func NewEchoZapLogger(baseLogger *zap.Logger) echo.MiddlewareFunc
- func NewTimingMiddleware() echo.MiddlewareFunc
- func NewVcapRequestID() echo.MiddlewareFunc
- func Setup(config *config.CfAPIConfig) error
- func buildRequestID(vcapRequestID string) string
- type BoilLogger
Constants
const (
RemoteIPField = "remote_ip"
TimeField = "time"
HostField = "host"
RequestField = "request"
UserAgentField = "user_agent"
StatusField = "status"
SizeField = "size"
RequestIDField = "request_id"
)
const (
HeaderVcapRequestID = "X-Vcap-Request-Id"
MaxSizeLimit = 255
)
Variables
var vcapRequestIDBadCharRegexp = regexp.MustCompile(`[^\w-]`) // shorthand for [a-zA-Z0-9_]
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
func buildRequestID
func buildRequestID(vcapRequestID string) string
type BoilLogger
type BoilLogger struct {
RedactParams bool
query, params string
logger *zap.Logger
}
func NewBoilLogger
func NewBoilLogger(redactParams bool, logger *zap.Logger) *BoilLogger
func (*BoilLogger) Write
func (b *BoilLogger) Write(data []byte) (n int, err error)
func (*BoilLogger) getLogger
func (b *BoilLogger) getLogger() *zap.Logger
Generated by gomarkdoc