MCPcopy Create free account
hub / github.com/kopia/kopia / PrintfFactory

Function PrintfFactory

internal/testlogging/printf.go:32–36  ·  view source on GitHub ↗

PrintfFactory returns LoggerForModuleFunc that uses given printf-style function to print log output.

(printf func(msg string, args ...any))

Source from the content-addressed store, hash-verified

30
31// PrintfFactory returns LoggerForModuleFunc that uses given printf-style function to print log output.
32func PrintfFactory(printf func(msg string, args ...any)) logging.LoggerFactory {
33 return func(module string) *zap.SugaredLogger {
34 return Printf(printf, "["+module+"] ")
35 }
36}
37
38type printfWriter struct {
39 printf func(msg string, args ...any)

Callers 1

BenchmarkLoggerFunction · 0.92

Calls 1

PrintfFunction · 0.85

Tested by 1

BenchmarkLoggerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…