logging

package
v0.0.0-...-599ae38 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger *zap.Logger

Functions

func DefaultLogConfig

func DefaultLogConfig(level int) zap.Config

default zap.Config. accept level of int type, vaule between -1 and 5

func L

func L() *zap.Logger

Return default Logger instance.

func LWithContext

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

Return Logger instance with request id from context

func NewDefaultLogger

func NewDefaultLogger(config zap.Config) *zap.Logger

Return a new *zap.Logger instance, accept a zap.Config

func RequestIDHandler

func RequestIDHandler(next http.Handler) http.Handler

Used as middleware, to insert request id into the response header if present

func S

func S() *zap.SugaredLogger

Return default Logger.Sugar instance.

func SWithContext

func SWithContext(ctx context.Context) *zap.SugaredLogger

Return Logger.Sugar instance with request id from context

Types

This section is empty.

Jump to

Keyboard shortcuts

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