mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 00:54:43 +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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user