Listeners. How you identify the caller is up to you though. Relying on thread naming is a bit hackish, as is using a ThreadLocal variable.
We thought of that option but we are not in a position to change any code in production. Is there anyway to achieve the same via configuration file? Do we have any tag for logging in jboss-cache-config.xml file?