mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-27 01:18:27 +00:00 
			
		
		
		
	Limit stdout tracelog to actual stdout (#16258)
Related #16243 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -199,7 +199,11 @@ func (c *Command) RunInDirTimeoutEnv(env []string, timeout time.Duration, dir st | ||||
| 		return nil, ConcatenateError(err, stderr.String()) | ||||
| 	} | ||||
| 	if stdout.Len() > 0 && log.IsTrace() { | ||||
| 		log.Trace("Stdout:\n %s", stdout.Bytes()[:1024]) | ||||
| 		tracelen := stdout.Len() | ||||
| 		if tracelen > 1024 { | ||||
| 			tracelen = 1024 | ||||
| 		} | ||||
| 		log.Trace("Stdout:\n %s", stdout.Bytes()[:tracelen]) | ||||
| 	} | ||||
| 	return stdout.Bytes(), nil | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user