MCPcopy Create free account
hub / github.com/docker/buildx / Format

Method Format

util/logutil/format.go:15–23  ·  view source on GitHub ↗
(entry *logrus.Entry)

Source from the content-addressed store, hash-verified

13}
14
15func (f *Formatter) Format(entry *logrus.Entry) ([]byte, error) {
16 msg := bytes.NewBuffer(nil)
17 fmt.Fprintf(msg, "%s: %s", strings.ToUpper(entry.Level.String()), entry.Message)
18 if v, ok := entry.Data[logrus.ErrorKey]; ok {
19 fmt.Fprintf(msg, ": %v", v)
20 }
21 fmt.Fprintf(msg, "\n")
22 return msg.Bytes(), nil
23}

Callers 15

sourceNameFunction · 0.80
PrintMethod · 0.80
sourceToInputFunction · 0.80
sourceUniqueIdentifierFunction · 0.80
formatProvenanceTimeFunction · 0.80
runDiskUsageFunction · 0.80
runBakeFunction · 0.80
lsPrintFunction · 0.80
LastActivityMethod · 0.80
runInspectFunction · 0.80
lsPrintFunction · 0.80
MarshalJSONMethod · 0.80

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected