logging

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFields

func AddFields(ctx context.Context, fields ...zap.Field)

func Logger

func Logger(ctx context.Context) *zap.Logger

Logger returns logger from context if exist or from global variable

func NewLogger

func NewLogger(isDev bool) (*zap.Logger, error)

func NewMiddleware

func NewMiddleware(gcpProjectID string, logger *zap.Logger) func(next http.Handler) http.Handler

Middleware is set logger with request id to context

func NewUnaryServerInterceptor

func NewUnaryServerInterceptor(gcpProjectID string) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors that logs request.

Types

type GraphQLResponseInterceptor

type GraphQLResponseInterceptor struct{}

func (GraphQLResponseInterceptor) ExtensionName

func (g GraphQLResponseInterceptor) ExtensionName() string

func (GraphQLResponseInterceptor) InterceptResponse

func (GraphQLResponseInterceptor) Validate

Jump to

Keyboard shortcuts

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