We're using log4j to log business events. Each application needs to specify some application key/token. I don't want to add this key/token to our API which creates the event as that data is static for each application and thus should not have to appear in the API. I'm looking for some way to define this token/key somewhere, ideally configuration, and I then need to be able to read it from a custom layout. What would be the best way to do this?
I looked over the MDC and I don't think I need to store it there as this information is global/static to the application. I think you can define system properties within the config but I'm not sure how to access those from a custom layout plugin. Thanks Nick