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

Co-authored-by: mmsqe <mavis@crypto.com>
This commit is contained in:
mergify[bot] 2024-04-21 21:16:03 +02:00 committed by GitHub
parent 4bd0e0216d
commit 0a682f7ae3
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)