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

Function TestLog

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

Source from the content-addressed store, hash-verified

134}
135
136func TestLog(t *testing.T) {
137 LogAndAssertJSON(t, func(log *Logger) {
138 log.Log(WarnLevel, "test")
139 }, func(fields Fields) {
140 assert.Equal(t, "test", fields["msg"])
141 assert.Equal(t, "warning", fields["level"])
142 })
143}
144
145func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) {
146 LogAndAssertJSON(t, func(log *Logger) {

Callers

nothing calls this directly

Calls 2

LogAndAssertJSONFunction · 0.85
LogMethod · 0.45

Tested by

no test coverage detected