Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: Simulation Refactor #3819

Merged
merged 21 commits into from
Mar 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address @alexanderbez comments
  • Loading branch information
rigelrozanski committed Mar 11, 2019
commit 640623400d9b76504e5cb40b9d0e324e7ed0698d
31 changes: 0 additions & 31 deletions x/simulation/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,6 @@ func (lw *StandardLogWriter) PrintLogs() {
}
}

//// Builds a function to append logs
//func getLogWriter(testingmode bool, opEntries []*OperationEntry) func(OperationEntry) {

//if !testingmode {
//return func(_ OperationEntry) {}
//}

//return func(opEntry OperationEntry) {
//opEntries = append(opEntries, opEntry)
//}
//}

//// Creates a function to print out the logs
//func logPrinter(testingmode bool, opEntries []*OperationEntry) func() {
//if !testingmode {
//return func() {}
//}

//return func() {
//f := createLogFile()
//_, _ = f.WriteString(fmt.Sprintf("debug opEntries: %v\n", opEntries))
//for i := 0; i < len(opEntries); i++ {
//writeEntry := fmt.Sprintf("%s\n", (*opEntries[i]).MustMarshal())
//_, err := f.WriteString(writeEntry)
//if err != nil {
//panic("Failed to write logs to file")
//}
//}
//}
//}

func createLogFile() *os.File {
var f *os.File
fileName := fmt.Sprintf("%s.log", time.Now().Format("2006-01-02_15:04:05"))
Expand Down