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

BUG: Use NullHandler to scope user algorithm code logging #2325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abepolk
Copy link

@abepolk abepolk commented Oct 8, 2018

As I mentioned in my comment on the issue, I have used NullHandler to block logs from the algorithm from being sent to stdout or stderr by pushing the NullHandler a context handler just outside the places where the algorithm and its methods (i.e. initialize) are invoked. Because the NullHandler lies in a higher position on the stack than any other handler called internally to zipline, it handles logs that are not handled by the algorithm. The unlog_method scopes a passed method by a context handler containing NullHandler. Resolves issue #2296.

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

Successfully merging this pull request may close these issues.

None yet

1 participant