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

File Logging #9

Open
maxholloway opened this issue Jun 28, 2020 · 0 comments
Open

File Logging #9

maxholloway opened this issue Jun 28, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers p4 Low Priority (priority 4)

Comments

@maxholloway
Copy link
Owner

File Logging

Interface-changing Proposal

Add an option to StrategyOptions to which logs should be written.

Motivation

If we do anything more complicated than running from command-line, the console printing doesn't make much sense. Also, there is a performance hit when we run make calls to the console, whereas writing logs to a file is much less expensive.

Implementation

  1. Add option to StrategyOptions called logfilepath.
  2. Add an if-else block to log that will decide how to output the statement, given the attribute in strat.options.logfilepath, then perform the desired output action.

Side thoughts

It will be worthwhile to check how costly this operation is in practice. If it severely slows down the backtest, we can add logic to batch-write the logging messages (either when the backlog gets to a certain size, or when the backtest is finished running). 😸

@maxholloway maxholloway added enhancement New feature or request good first issue Good for newcomers p4 Low Priority (priority 4) labels Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers p4 Low Priority (priority 4)
Projects
None yet
Development

No branches or pull requests

1 participant