wloginternal

package
v1.58.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UIDKey     = wlogContextKeyType("wlog.uid")
	SIDKey     = wlogContextKeyType("wlog.sid")
	TokenIDKey = wlogContextKeyType("wlog.tokenID")
	OrgIDKey   = wlogContextKeyType("wlog.orgID")
)

Variables

This section is empty.

Functions

func ContextWithID

func ContextWithID(ctx context.Context, key wlogContextKeyType, id string) context.Context

func IDFromContext

func IDFromContext(ctx context.Context, key wlogContextKeyType) *string

func WarnLoggerOutput

func WarnLoggerOutput(loggerType, output string, skip int) string

WarnLoggerOutput returns the logger output for a default warning logger for a given logger type. The output includes the location at which the call was made, with the "skip" parameter determining how far back in the call stack to go for the location (for example, skip=0 specifies the line in this function, skip=1 specifies the line that called this function, etc.).

This function is defined in an internal package because each logger type needs to define its own warning logger type but the format/content of the output should be consistent across them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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