log

package
v2.0.1-ci.16 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyCtxLogger

func CopyCtxLogger(ctx context.Context) context.Context

CopyCtxLogger creates a new context with a copy of any logger found in the context. This is useful when we don't want to pollute the caller's log context.

func Ctx

func Ctx(ctx context.Context) *zerolog.Logger

Ctx returns any logger contained in the context, or a disable logger if none is present.

func WithMethod

func WithMethod(ctx context.Context, method string)

WithMethod adds a method field to the context's logger.

func WithObjectID

func WithObjectID(ctx context.Context, id string)

WithObjectID adds an object ID field to the context's logger.

func WithUserID

func WithUserID(ctx context.Context, id string)

WithUserID adds a user ID field to the context's logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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