fix: use timestamp for sim log file name (#20108)

This commit is contained in:
mmsqe 2024-04-22 03:09:00 +08:00 committed by GitHub
parent 1bd4351241
commit bd1701f4f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,7 @@ func (lw *StandardLogWriter) PrintLogs() {
func createLogFile() *os.File {
var f *os.File
fileName := fmt.Sprintf("%s.log", time.Now().Format("2006-01-02_15:04:05"))
fileName := fmt.Sprintf("%d.log", time.Now().UnixMilli())
folderPath := path.Join(os.ExpandEnv("$HOME"), ".simapp", "simulations")
filePath := path.Join(folderPath, fileName)