Have a custom string appear in Elastic's logs when indexing a document

Hello,

I have a client requirement that every single time a document is indexed or updated, I should somehow send a token to Elastic with the sole purpose of that token appearing in Elastic logs*. Googling around lead me to elasticsearch-jetty which kind-of sort-of could do that, but is quite outdated. I couldn't find any other solutions. Thoughts?

* elaborating on the client scenario: documents have fairly long flow through several client micro-services. A "transaction id" is generated when the flow starts and each micro-service then logs this transaction id so that the "transaction" can be tracked and searched for in log aggregators. The client would like Elastic - as a final step - to also log this transaction id. Somehow.

This might be tough I'm afraid, I don't think Shield can do this level of logging at the moment.