logger

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package logger contains the infrastructure for logging that is shared between all microservices. It more or less configures the logrus logger the correct way so that it can work with the log-scrapping infstracture in Kubernetes.

Log implementation for all microservices in the project. Log functions can be called through the convenience interfaces logger.Debugf(), logger.Errorf(), logger.Panicf()

Deliberately reduces the interface to only Debugf, Errorf and Panicf. The other log levels are discouraged (see fdc Software Engineering Standards for details)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

func WithHttpLogger

func WithHttpLogger(logger *zap.Logger, inner http.Handler) http.Handler

func WithLogger

func WithLogger(ctx context.Context, logger *zap.Logger) context.Context

func Wrap

func Wrap(ctx context.Context, inner func(ctx context.Context) error) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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