log

package
v0.0.0-...-a003a19 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: Apache-2.0 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

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(output, level string) (*zap.Logger, error)

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