I would like to be able to have a method execute for every log message that will allow me to dynamically modify that message before it is logged. I know there are Filters that allow me to indicate whether a message should be logged or not, but I don't want to stop the message from being logged, I just want to modify it before it is logged. How can I go about doing this?
Note: I asked this question about log4j2 but I am open to other popular Java logging frameworks as well.