MCPcopy
hub / github.com/nektos/act / Logger

Function Logger

pkg/common/logger.go:14–22  ·  view source on GitHub ↗

Logger returns the appropriate logger for current context

(ctx context.Context)

Source from the content-addressed store, hash-verified

12
13// Logger returns the appropriate logger for current context
14func Logger(ctx context.Context) logrus.FieldLogger {
15 val := ctx.Value(loggerContextKeyVal)
16 if val != nil {
17 if logger, ok := val.(logrus.FieldLogger); ok {
18 return logger
19 }
20 }
21 return logrus.StandardLogger()
22}
23
24// WithLogger adds a value to the context for the logger
25func WithLogger(ctx context.Context, logger logrus.FieldLogger) context.Context {

Callers 15

removeExecutorFunction · 0.92
LoadDockerAuthConfigFunction · 0.92
LoadDockerAuthConfigsFunction · 0.92
ImageExistsLocallyFunction · 0.92
NewDockerBuildExecutorFunction · 0.92
createBuildContextFunction · 0.92
GetHealthMethod · 0.92
removeMethod · 0.92
mergeContainerConfigsMethod · 0.92
createMethod · 0.92
extractFromImageEnvMethod · 0.92

Calls

no outgoing calls

Tested by 1

TestCloneIfRequiredFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…