From 2c27548b828ff7567e65d4ad581e0b232b8dec2b Mon Sep 17 00:00:00 2001 From: jjaw Date: Wed, 10 Jun 2026 01:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E5=BA=A6=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=BE=AA=E7=8E=AF=E5=BC=80=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/service/gateway_service.go | 54 ++++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/backend/internal/service/gateway_service.go b/backend/internal/service/gateway_service.go index 531c93e4e7..78f2d4e736 100644 --- a/backend/internal/service/gateway_service.go +++ b/backend/internal/service/gateway_service.go @@ -2361,14 +2361,16 @@ func (s *GatewayService) listSchedulableAccounts(ctx context.Context, groupID *i "platform", platform, "use_mixed", useMixed, "count", len(accounts)) - for _, acc := range accounts { - slog.Debug("account_scheduling_account_detail", - "account_id", acc.ID, - "name", acc.Name, - "platform", acc.Platform, - "type", acc.Type, - "status", acc.Status, - "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + if slog.Default().Enabled(ctx, slog.LevelDebug) { + for _, acc := range accounts { + slog.Debug("account_scheduling_account_detail", + "account_id", acc.ID, + "name", acc.Name, + "platform", acc.Platform, + "type", acc.Type, + "status", acc.Status, + "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + } } } return accounts, useMixed, err @@ -2404,14 +2406,16 @@ func (s *GatewayService) listSchedulableAccounts(ctx context.Context, groupID *i "platform", platform, "raw_count", len(accounts), "filtered_count", len(filtered)) - for _, acc := range filtered { - slog.Debug("account_scheduling_account_detail", - "account_id", acc.ID, - "name", acc.Name, - "platform", acc.Platform, - "type", acc.Type, - "status", acc.Status, - "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + if slog.Default().Enabled(ctx, slog.LevelDebug) { + for _, acc := range filtered { + slog.Debug("account_scheduling_account_detail", + "account_id", acc.ID, + "name", acc.Name, + "platform", acc.Platform, + "type", acc.Type, + "status", acc.Status, + "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + } } return filtered, useMixed, nil } @@ -2437,14 +2441,16 @@ func (s *GatewayService) listSchedulableAccounts(ctx context.Context, groupID *i "group_id", derefGroupID(groupID), "platform", platform, "count", len(accounts)) - for _, acc := range accounts { - slog.Debug("account_scheduling_account_detail", - "account_id", acc.ID, - "name", acc.Name, - "platform", acc.Platform, - "type", acc.Type, - "status", acc.Status, - "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + if slog.Default().Enabled(ctx, slog.LevelDebug) { + for _, acc := range accounts { + slog.Debug("account_scheduling_account_detail", + "account_id", acc.ID, + "name", acc.Name, + "platform", acc.Platform, + "type", acc.Type, + "status", acc.Status, + "tls_fingerprint", acc.IsTLSFingerprintEnabled()) + } } return accounts, useMixed, nil }