09-06-2021 09:39 AM
Hello,
We have an application that uses tracking ids throughout multiple services. This id is also sent to Alfresco using headers.
We would like to log this id in some way. I searched the docs but could not find anything how to log (all) headers of the requests (e.g. when a node is added).
Is this possible, or is there some other way we could get this id to show up in the Alfresco logs?
Thanks.
Kind regards,
LNE
09-07-2021 06:31 AM
There is no default feature to map arbitrary HTTP headers into the logging context, but you could simply implement an extension with a WebFilter / ServletFilter to map your headers to the log4j MDC, and adapt the logging format via custom-log4j.properties to include those MDC variables.
Explore our Alfresco products with the links below. Use labels to filter content by product module.