Skip to content

Commit

Permalink
fix: use timestamp for sim log file name (backport #20108) (#20112)
Browse files Browse the repository at this point in the history
Co-authored-by: mmsqe <mavis@crypto.com>
  • Loading branch information
mergify[bot] and mmsqe authored Apr 21, 2024
1 parent 6f9f57c commit 3d03c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/simulation/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3d03c1b

Please sign in to comment.