MCPcopy Create free account
hub / github.com/belak/gitdir / WithLogger

Function WithLogger

context.go:66–68  ·  view source on GitHub ↗

WithLogger takes a parent context and a logger and returns a new context with that logger.

(parent context.Context, logger *zerolog.Logger)

Source from the content-addressed store, hash-verified

64// WithLogger takes a parent context and a logger and returns a new context
65// with that logger.
66func WithLogger(parent context.Context, logger *zerolog.Logger) context.Context {
67 return context.WithValue(parent, contextKeyLogger, logger)
68}
69
70// CtxSetLogger puts the given logger into the ssh.Context.
71func CtxSetLogger(parent ssh.Context, logger *zerolog.Logger) {

Callers 1

handleSessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected