SAP / cf-java-logging-support

The Java Logging Support for Cloud Foundry supports the creation of structured log messages and the collection of request metrics
Apache License 2.0
77 stars 48 forks source link

Refactor Request-Id Handling #81

Closed KarstenSchnitter closed 4 years ago

KarstenSchnitter commented 4 years ago

Request-Ids were treated specially before. They would be added, when the HTTP header x-vcap-request-id was found in an HTTP request. The field would not be added, even with a default value ("-") otherwise but just omitted from the logs. This applied to both application and request logs.

The code was refactored to implement this behaviour for all fields, that are generated from an HTTP header. This makes support for similar cases much simpler. Note: correlation-ids are still special, as they are generated if not found.