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

FluentRecordFormatter._structuring may raise AttributeError #45

Open
januszry opened this issue Oct 20, 2015 · 0 comments
Open

FluentRecordFormatter._structuring may raise AttributeError #45

januszry opened this issue Oct 20, 2015 · 0 comments

Comments

@januszry
Copy link

json.loads(str(msg)) may not return a dict, it can return:

  • int if msg is a json dumped from an int, for example msg = '123'
  • list if msg is a json dumped from a list, for example msg = '["s", "1"]'

Only dict have items() method.

So if you get a logger and add a fluent.handler to it, then you execute
logger.info('1')
you will get an AttributeError

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