I have a Java server (based on Socket.IO for Java, but that's not part of the question) that accepts requests from web clients, does some calculations, and sends them back the results.
The server uses some libraries, that use log4j for logging.
Since the calculations are long, I want to send to the clients, not only the final results, but also the logs.
Of course I want to send each client, only the log lines that are relevant to its request.
So, my question is: how can I configure log4j, such that all logs generated during a specific function-call go to a specific logger?