Skip to content

Conversation

@axd1x8a
Copy link
Contributor

@axd1x8a axd1x8a commented Jul 22, 2025

When using the JsonEncoder, values captured for serde serialization (e.g., key:serde = &value) are incorrectly logged as their Debug or Display string representation, rather than as a nested JSON object.

Example:

A log statement like this:

log::info!(
    response:serde = &MyStruct { id: 1 };
    "Request completed"
);

Produces this output:

{
  "attributes": {
    "response": "MyStruct { id: 1 }"
  },
  ...
}

Instead of the expected output:

{
  "attributes": {
    "response": { "id": 1 }
  },
  ...
}

@axd1x8a axd1x8a requested review from estk and gadunga as code owners July 22, 2025 15:20
@estk
Copy link
Owner

estk commented Sep 17, 2025

@feeeek can you please update the branch?

@axd1x8a
Copy link
Contributor Author

axd1x8a commented Sep 17, 2025

@estk done

@estk estk merged commit b0f01ee into estk:main Sep 18, 2025
12 checks passed
@axd1x8a axd1x8a deleted the feat/kv-serde branch September 18, 2025 04:02
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.

2 participants