lolly/internal/app/testutil.go
xfy 454a1be9e1 refactor(app): add test logger helper function
Create setupTestLogger() helper to reduce duplicate logger initialization
in test files. Replace 20+ occurrences of logging.NewAppLogger calls.

- Create testutil.go with setupTestLogger() function
- Update app_test.go to use the new helper
- Remove unused logging import from app_test.go

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 18:06:55 +08:00

15 lines
351 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//go:build !windows
package app
import (
"rua.plus/lolly/internal/config"
"rua.plus/lolly/internal/logging"
)
// setupTestLogger 创建一个测试用的日志记录器。
// 返回一个使用默认配置的 AppLogger适用于测试场景。
func setupTestLogger() *logging.AppLogger {
return logging.NewAppLogger(&config.LoggingConfig{})
}