MCPcopy
hub / github.com/sirupsen/logrus / String

Method String

entry.go:98–105  ·  entry.go::Entry.String

String returns the string representation from the reader and ultimately the formatter.

()

Source from the content-addressed store, hash-verified

96// String returns the string representation from the reader and ultimately the
97// formatter.
98func (entry *Entry) String() (string, error) {
99 serialized, err := entry.Bytes()
100 if err != nil {
101 return "", err
102 }
103 str := string(serialized)
104 return str, nil
105}
106
107// WithError adds an error as single field (using the key defined in [ErrorKey])
108// to the Entry.

Callers 15

TestEntryLogfLevelFunction · 0.45
TestHandlerFunction · 0.45
TestFieldValueErrorFunction · 0.45
TestNoFieldValueErrorFunction · 0.45
TestConvertLevelToStringFunction · 0.45
FormatMethod · 0.45
initMethod · 0.45
FormatMethod · 0.45
printColoredMethod · 0.45
TestLevelUnmarshalTextFunction · 0.45
TestLevelMarshalTextFunction · 0.45

Calls 1

BytesMethod · 0.95

Tested by 12

TestEntryLogfLevelFunction · 0.36
TestHandlerFunction · 0.36
TestFieldValueErrorFunction · 0.36
TestNoFieldValueErrorFunction · 0.36
TestConvertLevelToStringFunction · 0.36
TestLevelUnmarshalTextFunction · 0.36
TestLevelMarshalTextFunction · 0.36
TestEscaping_InterfaceFunction · 0.36
TestPadLevelTextFunction · 0.36