Skip to content

Feature request - Pass all extra properties into the log #77

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

Closed
uda opened this issue Jun 29, 2021 · 1 comment
Closed

Feature request - Pass all extra properties into the log #77

uda opened this issue Jun 29, 2021 · 1 comment

Comments

@uda
Copy link
Contributor

uda commented Jun 29, 2021

we switched from json-lgging-py to this, and we already have many logs writing like this:

logger.info('Something happened', extra={"correlation_id": correlation_id, "tags": ["app:name"]})

Switching to json-logging we lost those data points until i read again the docs about logging extra details.

Personally I think this complicates things and can be simplified, I am going to do it any way for our usage, but want to know if this contribution back is wanted (with backwards compatibility for users of json-logging), with optional precedence of props over direct properties or the other way around.

@bobbui
Copy link
Owner

bobbui commented Jun 29, 2021

im not sure if i fully understand what u meant, but nevertheless get an PR up i can take a look, contribution is welcomed

uda added a commit to zencity/json-logging-python that referenced this issue Jun 29, 2021
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
@bobbui bobbui closed this as completed Jul 9, 2021
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

2 participants