Documentation
¶
Index ¶
Constants ¶
View Source
const ( // LogSourceRestate logs come from the sdk-go library LogSourceRestate = iota // LogSourceUser logs come from user handlers that use the Context.Log() logger. LogSourceUser )
Variables ¶
This section is empty.
Functions ¶
func WithLogContext ¶
func WithLogContext(parent context.Context, logContext *LogContext) context.Context
WithLogContext stores a LogContext in the provided context.Context, returning a new context
Types ¶
type LogContext ¶
type LogContext struct { // The source of the logline Source LogSource // Whether the user code is currently replaying IsReplaying bool }
LogContext contains information stored in the context that is passed to loggers
func LogContextFrom ¶
func LogContextFrom(ctx context.Context) *LogContext
LogContextFrom retrieves the LogContext stored in this context.Context, or otherwise returns nil
Click to show internal directories.
Click to hide internal directories.