Documentation
¶
Overview ¶
Package gcpzap configures the Uber zap logging library for Google Cloud.
Index ¶
- func NewProduction(opts ...zap.Option) (*zap.Logger, error)
- func NewProductionConfig() zap.Config
- func WithTrace(logger *zap.SugaredLogger, tracer *gcplogs.Tracer, r *http.Request) *zap.SugaredLogger
- func WithTraceCore(logger *zap.Logger, tracer *gcplogs.Tracer, r *http.Request) *zap.Logger
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProduction ¶
NewProduction wraps zap.NewProduction with configuration that works on Google Cloud.
func NewProductionConfig ¶
NewProductionConfig wraps zap.NewProductionConfig with configuration that works on Google Cloud.
func WithTrace ¶
func WithTrace( logger *zap.SugaredLogger, tracer *gcplogs.Tracer, r *http.Request, ) *zap.SugaredLogger
WithTrace returns a *zap.SugaredLogger that will use the trace ID from r, if it is set.
Types ¶
Click to show internal directories.
Click to hide internal directories.