diff --git a/cmd/chainsimulator/flags.go b/cmd/chainsimulator/flags.go index 42ce5ec..4177d1e 100644 --- a/cmd/chainsimulator/flags.go +++ b/cmd/chainsimulator/flags.go @@ -51,6 +51,11 @@ var ( Usage: "The path to proxy configs", Value: "./config/proxy/config", } + pathWhereToSaveLogs = cli.StringFlag{ + Name: "path-log-save", + Usage: "The path where to save logs", + Value: "./", + } startTime = cli.Int64Flag{ Name: "start-time", Usage: "The start time of the chain", diff --git a/cmd/chainsimulator/main.go b/cmd/chainsimulator/main.go index d22c0dc..7749a5f 100644 --- a/cmd/chainsimulator/main.go +++ b/cmd/chainsimulator/main.go @@ -82,6 +82,7 @@ func main() { blockTimeInMs, skipConfigsDownload, fetchConfigsAndClose, + pathWhereToSaveLogs, } app.Authors = []cli.Author{ @@ -300,14 +301,9 @@ func initializeLogger(ctx *cli.Context, cfg config.Config) (closing.Closer, erro return nil, nil } - workingDir, err := os.Getwd() - if err != nil { - log.LogIfError(err) - workingDir = "" - } - + pathLogsSave := ctx.GlobalString(pathWhereToSaveLogs.Name) fileLogging, err := file.NewFileLogging(file.ArgsFileLogging{ - WorkingDir: workingDir, + WorkingDir: pathLogsSave, DefaultLogsPath: cfg.Config.Logs.LogsPath, LogFilePrefix: cfg.Config.Logs.LogFilePrefix, }) diff --git a/pkg/facade/simulatorFacade.go b/pkg/facade/simulatorFacade.go index 60f3dde..385e7bf 100644 --- a/pkg/facade/simulatorFacade.go +++ b/pkg/facade/simulatorFacade.go @@ -17,7 +17,7 @@ import ( const ( errMsgAccountNotFound = "account was not found" - maxNumOfBlockToGenerateUntilTxProcessed = 10 + maxNumOfBlockToGenerateUntilTxProcessed = 20 ) type simulatorFacade struct {