Option to compact log output
New option jsonlogcompact enables to log frequent repeated log messages (like "Not lending due to rate below ...") to currency web page section instead of appending to log list. If enabled only last message is displayed.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] I have read CONTRIBUTING.md
- [x] I fully understand Github Flow.
- [x] My code adheres to the code style of this project.
- [x] I have updated the documentation in /docs if I have changed the config, arguments, logic in how the bot works, or anything that understandably needs a documentation change.
- [x] I have updated the config file accordingly if my change requires a new configuration setting or changes an existing one.
- [x] I have tested the bot with no issues for 24 continuous hours. If issues were experienced, they have been patched and tested again.
At the moment there is only one message which will printed to currency section: "Not lending due to rate below ..."
I decided to implement it in log module and to write messages to another position in json log when option is enabled. It was easier to implement (for me) and it gives the possibility to enhance it in future and also to implement dependences between different log events. (For example: Log message "Not lending due to rate below ..." will be removed when a followed order is successfully placed.)