ErrorfCtx logs the given formatted string and args to the error log level and given log key.
(ctx context.Context, format string, args ...any)
| 159 | |
| 160 | // ErrorfCtx logs the given formatted string and args to the error log level and given log key. |
| 161 | func ErrorfCtx(ctx context.Context, format string, args ...any) { |
| 162 | // no-op call to enable golang.org/x/tools/go/analysis/passes/printf checking in go vet |
| 163 | if false { |
| 164 | _ = fmt.Sprintf(format, args...) |
| 165 | } |
| 166 | logTo(ctx, LevelError, KeyAll, format, args...) |
| 167 | } |
| 168 | |
| 169 | // WarnfCtx logs the given formatted string and args to the warn log level and given log key. |
| 170 | func WarnfCtx(ctx context.Context, format string, args ...any) { |