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

Function TestReportCallerOnTextFormatter

logrus_test.go:770–780  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

768}
769
770func TestReportCallerOnTextFormatter(t *testing.T) {
771 l := New()
772
773 l.Formatter.(*TextFormatter).ForceColors = true
774 l.Formatter.(*TextFormatter).DisableColors = false
775 l.WithFields(Fields{"func": "func", "file": "file"}).Info("test")
776
777 l.Formatter.(*TextFormatter).ForceColors = false
778 l.Formatter.(*TextFormatter).DisableColors = true
779 l.WithFields(Fields{"func": "func", "file": "file"}).Info("test")
780}
781
782func TestSetReportCallerRace(t *testing.T) {
783 l := New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
InfoMethod · 0.65
WithFieldsMethod · 0.65

Tested by

no test coverage detected