Zero-pad logfile names (#11)

- so that they are sorted properly
This commit is contained in:
Richard van der Hoff 2017-04-18 13:06:21 +01:00 committed by GitHub
parent 40a6eec4e1
commit 8505268edf

View file

@ -179,7 +179,7 @@ func (s *submitServer) saveReport(ctx context.Context, p payload) (*submitRespon
} }
for i, log := range p.Logs { for i, log := range p.Logs {
if err := gzipAndSave([]byte(log.Lines), prefix, fmt.Sprintf("logs-%d.log.gz", i)); err != nil { if err := gzipAndSave([]byte(log.Lines), prefix, fmt.Sprintf("logs-%04d.log.gz", i)); err != nil {
return nil, err // TODO: Rollback? return nil, err // TODO: Rollback?
} }
} }