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

Exception when _process_event returns dict #26

Closed
orestis opened this issue Jan 23, 2014 · 0 comments
Closed

Exception when _process_event returns dict #26

orestis opened this issue Jan 23, 2014 · 0 comments

Comments

@orestis
Copy link

orestis commented Jan 23, 2014

This could be a documentation issue, or me not understanding how to use structlog, but here goes:

In BoundLoggerBase (_base.py), _process_event can either return a tuple of: (event_dict,), {} or just event_dict. However in the same class, _proxy_to_logger always calls _process_event like so:

            args, kw = self._process_event(method_name, event, event_kw)

I have a custom logger that needs access to the raw event_dict (to store it in a database), so I don't have a last processor to turn it into a string.

I have various workarounds I can think of (e.g. serialize the event_dict, and deserialize in the logger as needed), but I was wondering if this was a bug.

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

No branches or pull requests

1 participant