Open
Conversation
"dexbot" logger should use same verbosity settings defined for per_worker logger and also it should log into file 'dexbot.log' too.
Plugins are python classes supposed to serve as workers to perform any additional operations which are not performed from strategies. Example use-cases: * Download trading history * Analyze trading history * Check for updates * Report dexbot statistic Current implementation uses separate thread and asyncio event loop inside. This is a temporary solution before refactoring WorkerInfrastructure to asyncio. Closes: Codaone#500
db80b49 to
43092dc
Compare
Carbon-Zero
approved these changes
Apr 5, 2019
This was referenced Apr 6, 2019
Closed
joelvai
requested changes
Aug 8, 2019
| self.update_notify() | ||
|
|
||
| def run(self): | ||
| self.plugins_thread = PluginInfrastructure(self.config) |
Collaborator
There was a problem hiding this comment.
Initialize self.plugins_thread in __init__
|
|
||
| log = logging.getLogger(__name__) | ||
|
|
||
| class PluginInfrastructure(threading.Thread): |
Collaborator
There was a problem hiding this comment.
Add one extra line above, PEP8 error.
| import dexbot.plugins | ||
| from dexbot.helper import iter_namespace | ||
|
|
||
| from bitshares import BitShares |
Collaborator
There was a problem hiding this comment.
Works but to be more specific change to from bitshares.bitshares import BitShares.
| # Root logger also logs into stream and file with respect of cli-defined verbosity | ||
| logging.getLogger("dexbot").addHandler(ch) | ||
| logging.getLogger("dexbot").addHandler(fh) | ||
| logging.getLogger("dexbot").setLevel(getattr(logging, verbosity.upper())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #500