Documentation ¶
Overview ¶
* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache
Index ¶
- Variables
- func DefaultLogConfig(level int) zap.Config
- func L() *zap.Logger
- func LWithContext(ctx context.Context) *zap.Logger
- func NewDefaultLogger(config zap.Config) *zap.Logger
- func RequestIDHandler(next http.Handler) http.Handler
- func S() *zap.SugaredLogger
- func SWithContext(ctx context.Context) *zap.SugaredLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger *zap.Logger
Functions ¶
func DefaultLogConfig ¶
default zap.Config. accept level of int type, vaule between -1 and 5
func LWithContext ¶
Return Logger instance with request id from context
func NewDefaultLogger ¶
Return a new *zap.Logger instance, accept a zap.Config
func RequestIDHandler ¶
Used as middleware, to insert request id into the response header if present
func SWithContext ¶
func SWithContext(ctx context.Context) *zap.SugaredLogger
Return Logger.Sugar instance with request id from context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.