Home / Function/ Test_Fiberlog_SetLevel() — fiber Function Reference

Test_Fiberlog_SetLevel() — fiber Function Reference

Architecture documentation for the Test_Fiberlog_SetLevel() function in fiberlog_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  4c8c5d88_3402_921e_27d6_eb619c33fce6["Test_Fiberlog_SetLevel()"]
  28781060_572c_d6ba_cf27_6dc163d62c70["fiberlog_test.go"]
  4c8c5d88_3402_921e_27d6_eb619c33fce6 -->|defined in| 28781060_572c_d6ba_cf27_6dc163d62c70
  style 4c8c5d88_3402_921e_27d6_eb619c33fce6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

log/fiberlog_test.go lines 27–71

func Test_Fiberlog_SetLevel(t *testing.T) {
	mockLogger := &defaultLogger{}
	SetLogger(mockLogger)

	// Test cases
	testCases := []struct {
		name     string
		level    Level
		expected Level
	}{
		{
			name:     "Test case 1",
			level:    LevelDebug,
			expected: LevelDebug,
		},
		{
			name:     "Test case 2",
			level:    LevelInfo,
			expected: LevelInfo,
		},
		{
			name:     "Test case 3",
			level:    LevelWarn,
			expected: LevelWarn,
		},
		{
			name:     "Test case 4",
			level:    LevelError,
			expected: LevelError,
		},
		{
			name:     "Test case 5",
			level:    LevelFatal,
			expected: LevelFatal,
		},
	}

	// Run tests
	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			SetLevel(tc.level)
			require.Equal(t, tc.expected, mockLogger.level)
		})
	}
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Fiberlog_SetLevel() do?
Test_Fiberlog_SetLevel() is a function in the fiber codebase, defined in log/fiberlog_test.go.
Where is Test_Fiberlog_SetLevel() defined?
Test_Fiberlog_SetLevel() is defined in log/fiberlog_test.go at line 27.

Analyze Your Own Codebase

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

Try Supermodel Free