Skip to content

Additional fields for structured JSON logging incompatible with nested ecs logging in 3.5.x #46351

@johannes-rogowski-ituc

Description

@johannes-rogowski-ituc

When using Spring-Boot 3.5.x (tried with 3.5.0 as well as 3.5.3), the properties added with the logging.structured.json.add.*-Variables are not transformed into the new nested approach for the logging.structured.format.console=ecs value.

For example: When using logging.structured.json.add.my.custom.field=Value, I would expect the log too look like that:

{
  "my": {
    "custom": {
      "field": "Value"
    }
  }
 }

Instead it still uses the "old" way of Spring-Boot 3.4.x by displaying it in a dot-notation as follows:

{
  "my.custom.field": "Value"
}

I would assume that this mix of strategies is exposing a risk of the backend log-ingestion system to be confused when trying to parse those json lines.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions