Home / Function/ Test_Logger_All() — fiber Function Reference

Test_Logger_All() — fiber Function Reference

Architecture documentation for the Test_Logger_All() function in logger_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  db8a16d1_19a3_4f15_1a56_e4e887799dc1["Test_Logger_All()"]
  97b45bc9_01a3_2a9a_4c94_9de1344ca94c["logger_test.go"]
  db8a16d1_19a3_4f15_1a56_e4e887799dc1 -->|defined in| 97b45bc9_01a3_2a9a_4c94_9de1344ca94c
  style db8a16d1_19a3_4f15_1a56_e4e887799dc1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/logger/logger_test.go lines 451–472

func Test_Logger_All(t *testing.T) {
	t.Parallel()
	buf := bytebufferpool.Get()
	defer bytebufferpool.Put(buf)

	app := fiber.New()

	app.Use(New(Config{
		Format: "${pid}${reqHeaders}${referer}${scheme}${protocol}${ip}${ips}${host}${url}${ua}${body}${route}${black}${red}${green}${yellow}${blue}${magenta}${cyan}${white}${reset}${error}${reqHeader:test}${query:test}${form:test}${cookie:test}${non}",
		Stream: buf,
	}))

	// Alias colors
	colors := app.Config().ColorScheme

	resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, pathFooBar, http.NoBody))
	require.NoError(t, err)
	require.Equal(t, fiber.StatusNotFound, resp.StatusCode)

	expected := fmt.Sprintf("%dHost=example.comhttpHTTP/1.10.0.0.0example.com/?foo=bar/%s%s%s%s%s%s%s%s%sNot Found", os.Getpid(), colors.Black, colors.Red, colors.Green, colors.Yellow, colors.Blue, colors.Magenta, colors.Cyan, colors.White, colors.Reset)
	require.Equal(t, expected, buf.String())
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Logger_All() do?
Test_Logger_All() is a function in the fiber codebase, defined in middleware/logger/logger_test.go.
Where is Test_Logger_All() defined?
Test_Logger_All() is defined in middleware/logger/logger_test.go at line 451.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free