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.

Comment From: philwebb

We'll need to change StructuredLoggingJsonPropertiesJsonMembersCustomizer to deal with this and unfortunately it's not aware of the format being written. I think with a bit of refactoring, we can make it work.