MCPcopy
hub / github.com/jaypipes/ghw / Warn

Function Warn

internal/log/log.go:35–44  ·  view source on GitHub ↗

Warn outputs an WARN-level log message to the logger configured in the supplied context.

(ctx context.Context, format string, args ...any)

Source from the content-addressed store, hash-verified

33// Warn outputs an WARN-level log message to the logger configured in the
34// supplied context.
35func Warn(ctx context.Context, format string, args ...any) {
36 logger := config.Logger(ctx)
37 if logger == nil || !logger.Enabled(ctx, slog.LevelWarn) {
38 return
39 }
40 var stack [1]uintptr
41 runtime.Callers(2, stack[:]) // skip [Callers, Warn]
42 r := slog.NewRecord(time.Now(), slog.LevelWarn, strings.TrimSpace(fmt.Sprintf(format, args...)), stack[0])
43 _ = logger.Handler().Handle(ctx, r)
44}
45
46// Debug outputs an DEBUG-level log message to the logger configured in the
47// supplied context.

Callers 15

loadMethod · 0.92
NewFunction · 0.92
getDevicesMethod · 0.92
memoryCacheLevelFunction · 0.92
memoryCacheIDFunction · 0.92
memoryCacheSizeFunction · 0.92
memoryCacheTypeFunction · 0.92
memoryCacheSharedCPUMapFunction · 0.92
loadMethod · 0.92
topologyNodesFunction · 0.92
processorsGetFunction · 0.92
CoresForNodeFunction · 0.92

Calls 2

LoggerFunction · 0.92
HandleMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…