From 8542320fa8a3089ec2098ffbc074799dc199da7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Galicz?= Date: Mon, 18 Nov 2024 06:47:23 +0100 Subject: [PATCH] fix: :bug: improve error logging in RemoveTorrents to include torrent hash and skip processing on tracker retrieval failure --- transmission.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmission.go b/transmission.go index c2f74e6..ccb2b41 100644 --- a/transmission.go +++ b/transmission.go @@ -103,7 +103,8 @@ func (app *app) RemoveTorrents() error { tracker, err := app.db.GetTrackerByHash(*torrent.HashString) if err != nil { - app.logger.Error("failed to get tracker by hash", "error", err) + app.logger.Error(fmt.Sprintf("failed to get tracker by hash %s", *torrent.HashString), "error", err) + app.logger.Info("Skipping torrent", "name", *torrent.Name) continue }