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