mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
Make verbose checks in tryBranch
- It's likely that the tryBranch is returning false when it should be returning true, make these logs more verbose so they show up on production logs.
This commit is contained in:
parent
1ae50735a1
commit
0cee937953
1 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
|
|||
// also disallow search indexing and add a Link header to the canonical URL.
|
||||
tryBranch := func(log zerolog.Logger, repo, branch string, path []string, canonicalLink string) bool {
|
||||
if repo == "" {
|
||||
log.Debug().Msg("tryBranch: repo is empty")
|
||||
log.Warn().Msg("tryBranch: repo is empty")
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
|
|||
// Check if the branch exists, otherwise treat it as a file path
|
||||
branchTimestampResult := upstream.GetBranchTimestamp(giteaClient, targetOwner, repo, branch, branchTimestampCache)
|
||||
if branchTimestampResult == nil {
|
||||
log.Debug().Msg("tryBranch: branch doesn't exist")
|
||||
log.Warn().Msg("tryBranch: branch doesn't exist")
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue