logging

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 10 Imported by: 1

README

logging

Small library to initiate and manage a zap logger based on how logging is done in google/exposure-notification-server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() logr.Logger

DefaultLogger gives you a logger with the default settings replied.

func FromContext

func FromContext(ctx context.Context) logr.Logger

FromContext returns the logger stored within the context. If no logger is stored, the default logger is returned.

func NewLogger

func NewLogger(verbosityLevel int, development bool) logr.Logger

NewLogger creates a new logger with the given configuration.

func NewLoggerFromEnv

func NewLoggerFromEnv() logr.Logger

NewLoggerFromEnv creates a new logger from the environment. It consumes LOG_LEVEL for determining the level and LOG_MODE for determining the output parameters.

func WithLogger

func WithLogger(ctx context.Context, logger logr.Logger) context.Context

WithLogger creates a new context with the given logger attached.

Types

This section is empty.

Jump to

Keyboard shortcuts

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