log

package
v0.0.0-...-f2e0f22 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(ctx context.Context, msg string, keysAndValues ...any)

Fatal emit a log message on error level and quit. Defered functions will not be called, so Fatal() should be avoided if possible.

func NewContext

func NewContext(ctx context.Context, z *zap.Logger) context.Context

NewContext returns a context with a logr.Logger based on the passed zap.Logger. If the passed context already contains a logr.Logger it is returned without modifications.

func ZapLogger

func ZapLogger(level string) *zap.Logger

ZapLogger returns a default logger to use in NewContext. Allowed levels are "debug" or "trace", anything else is "info".

Types

This section is empty.

Jump to

Keyboard shortcuts

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