fix: distribute log files to folders

This commit is contained in:
Jason Song
2022-10-28 18:00:00 +08:00
parent 6a0614f4a5
commit 3c7fce0d37
2 changed files with 6 additions and 1 deletions

View File

@ -148,3 +148,7 @@ func ParseLog(in string) (timestamp time.Time, content string, err error) {
content = in[index+1:]
return
}
func LogFileName(repoFullName string, taskID int64) string {
return fmt.Sprintf("%s/%02x/%d.log", repoFullName, taskID%256, taskID)
}