mirror of
https://github.com/go-gitea/gitea
synced 2025-02-22 06:29:39 +01:00
Fix trace log to show value instead of pointers (#18926)
- Fixes a issue with a trace of repo.Units whereby it would show the pointers. Before:  After: 
This commit is contained in:
parent
c9da11c6b2
commit
f56bba1a78
@ -290,7 +290,14 @@ func (repo *Repository) LoadUnits(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
repo.Units, err = getUnitsByRepoID(db.GetEngine(ctx), repo.ID)
|
||||
log.Trace("repo.Units: %-+v", repo.Units)
|
||||
if log.IsTrace() {
|
||||
unitTypeStrings := make([]string, len(repo.Units))
|
||||
for i, unit := range repo.Units {
|
||||
unitTypeStrings[i] = unit.Type.String()
|
||||
}
|
||||
log.Trace("repo.Units, ID=%d, Types: [%s]", repo.ID, strings.Join(unitTypeStrings, ", "))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user