Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It turns out that you can't call `LogStasher.add_custom_fields` twice. Because Content Store's custom fields config was being run after the govuk_app_config gem's own custom fields config, the gem's config was being overwritten. So, fields like `govuk_request_id` and `varnish_id` weren't appearing in Content Store's controller request logs (but `govuk_dependency_resolution_source_content_id` was). The gem (version 9.7.0) now provides a mechanism for setting custom fields that doesn't overwrite the gem's own settings https://docs.publishing.service.gov.uk/repos/govuk_app_config.html#logger-configuration: ``` GovukJsonLogging.configure do add_custom_fields do |fields| fields[:govuk_custom_field] = request.headers["GOVUK-Custom-Header"] end end ```
- Loading branch information