feat: 请求日志记录
This commit is contained in:
7
main.go
7
main.go
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
"gpt-load/internal/app"
|
||||
"gpt-load/internal/container"
|
||||
"gpt-load/internal/models"
|
||||
"gpt-load/internal/types"
|
||||
"gpt-load/internal/utils"
|
||||
|
||||
@@ -39,12 +38,6 @@ func main() {
|
||||
logrus.Fatalf("Failed to provide indexPage: %v", err)
|
||||
}
|
||||
|
||||
// Provide the request log channel as a value
|
||||
requestLogChan := make(chan models.RequestLog, 1000)
|
||||
if err := container.Provide(func() chan models.RequestLog { return requestLogChan }); err != nil {
|
||||
logrus.Fatalf("Failed to provide request log channel: %v", err)
|
||||
}
|
||||
|
||||
// Initialzie global logger
|
||||
if err := container.Invoke(func(configManager types.ConfigManager) {
|
||||
utils.SetupLogger(configManager)
|
||||
|
Reference in New Issue
Block a user