From 7a7cbac171c1f04fcd3a8194675710dd23d4f988 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 22 Jul 2022 01:00:48 +0200 Subject: [PATCH] more debug log --- server/gitea/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/gitea/client.go b/server/gitea/client.go index 6653d40..9c45e66 100644 --- a/server/gitea/client.go +++ b/server/gitea/client.go @@ -7,6 +7,7 @@ import ( "strings" "time" + "github.com/rs/zerolog/log" "github.com/valyala/fasthttp" "github.com/valyala/fastjson" ) @@ -79,7 +80,9 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str switch resp.StatusCode() { case fasthttp.StatusOK: if client.followSymlinks && string(resp.Header.Peek(giteaObjectTypeHeader)) == "symlink" { - return client.ServeRawContent(targetOwner, targetRepo, ref, strings.TrimSpace(string(resp.Body()))) + linkDest := strings.TrimSpace(string(resp.Body())) + log.Debug().Msgf("follow symlink from '%s' to '%s'", resource, linkDest) + return client.ServeRawContent(targetOwner, targetRepo, ref, linkDest) } return resp, nil