MCPcopy Index your code
hub / github.com/imroc/req / TestLogger

Function TestLogger

logger_test.go:11–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestLogger(t *testing.T) {
12 buf := new(bytes.Buffer)
13 l := NewLogger(buf, "", log.Ldate|log.Lmicroseconds)
14 c := tc().SetLogger(l)
15 c.SetProxyURL(":=\\<>ksfj&*&sf")
16 tests.AssertContains(t, buf.String(), "error", true)
17 buf.Reset()
18 c.R().SetOutput(nil)
19 tests.AssertContains(t, buf.String(), "warn", true)
20}
21
22func TestLoggerFromStandardLogger(t *testing.T) {
23 buf := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 9

AssertContainsFunction · 0.92
NewLoggerFunction · 0.85
tcFunction · 0.85
SetLoggerMethod · 0.80
SetProxyURLMethod · 0.80
ResetMethod · 0.80
RMethod · 0.80
StringMethod · 0.45
SetOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…