zapctx

package
v0.0.0-...-979aab4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

(see github.com/uber-go/zap) with contexts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, msg string, fields ...zapcore.Field)

func Error

func Error(ctx context.Context, msg string, fields ...zapcore.Field)

func Info

func Info(ctx context.Context, msg string, fields ...zapcore.Field)

func Logger

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

Logger returns the logger associated with the given context. If there is no context or no logger, it will panic.

func Warn

func Warn(ctx context.Context, msg string, fields ...zapcore.Field)

func WithFields

func WithFields(ctx context.Context, fields ...zapcore.Field) context.Context

WithFields returns a new context derived from ctx that has a logger that always logs the given fields.

func WithLogger

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

WithLogger returns a new context derived from ctx that is associated with the given logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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