improve: log fields

This commit is contained in:
Mmx
2024-09-25 21:48:07 +08:00
parent d9d09bfc33
commit a3e28d3696
15 changed files with 103 additions and 66 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"github.com/Mmx233/BackoffCli/backoff"
"github.com/Mmx233/BitSrunLoginGo/internal/config/keys"
"time"
)
@@ -10,7 +11,7 @@ var BackoffConfig backoff.Conf
func initBackoff() {
setting := Settings.Backoff
BackoffConfig = backoff.Conf{
Logger: Logger,
Logger: Logger.WithField(keys.LogComponent, "backoff"),
DisableRecovery: true,
InitialDuration: time.Duration(setting.InitialDuration) * time.Second,
MaxDuration: time.Duration(setting.MaxDuration) * time.Second,