-
-
Notifications
You must be signed in to change notification settings - Fork 59
Implement extra properties from json-logging-py #78
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
Implement extra properties from json-logging-py #78
Conversation
Addresses feature request bobbui#77 Taken from: https://github.com/sebest/json-logging-py/blob/master/jsonlogging.py#L40 Original work by Sebastien Estienne <[email protected]> Distributed under the MIT license
thanks for your contribution, there is one test is failing, can u take a look |
basestring is a Python 2 type, in Python 3 there is only str. The code from json-logging will need to be updated to Python 3. |
ideally the this module is built to support both py2 and py3 . I see this
Isnt it supposed to be working for both py2 and py3 |
Ah, didn't see that you still support Python 2, as the test matrix is only targeting 3.7 to 3.9 In this case flake8 could be instructed to disable the check for this specific line, ie if sys.version_info < (3, 0):
EASY_TYPES = (basestring, bool, dict, float, int, list, type(None)) # noqa: F821
else:
RECORD_ATTR_SKIP_LIST.append('stack_info')
EASY_TYPES = (str, bool, dict, float, int, list, type(None))
``` |
@uda Can u add suggested flake8 fix to get it passed |
Yeah, I can remove all Python 2 BC code or put comments to fix the flake8 test |
flake8 would be great |
I added a fix for the |
looking good |
Addresses feature request #77
Taken from: https://github.com/sebest/json-logging-py/blob/master/jsonlogging.py#L40
Original work by Sebastien Estienne [email protected]
Distributed under the MIT license