How to set values on server startup which will be used later while logging

I’m wondering if its possible to run code on server startup, so that I can add server specific values which will be used for logging, for example to the MDC.

In our case I need to read some values from a config file on disk once on startup.

Is there a way to do this in a configurable fashion? I didn’t see anything SPI wise which seemed to fit this need and did search around for an hour or so but don’t have good leads on this one.

Still wondering about this one…