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

Option to compact log output #504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mahiso
Copy link
Contributor

@mahiso mahiso commented Sep 1, 2017

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)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read CONTRIBUTING.md
  • I fully understand Github Flow.
  • My code adheres to the code style of this project.
  • 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.
  • I have updated the config file accordingly if my change requires a new configuration setting or changes an existing one.
  • I have tested the bot with no issues for 24 continuous hours. If issues were experienced, they have been patched and tested again.

@ghost ghost added the Queued label Sep 1, 2017
Copy link
Member

@Evanito Evanito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

Could you list in the documentation all the lines that get compacted? So users know what they are getting into.

Would also be awesome (but I don't expect) if this could be done entirely on the webpage's end, so that you could toggle this using the html settings.

I'll test the code then get back to you.

@mahiso
Copy link
Contributor Author

mahiso commented Sep 23, 2017

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants