Been a lurker for a while, so this is my first time to say 'hi'.
I've come across a really 'stubborn' problem i can't resolve.
I'm building a webservlet 3 app with hibernate on jdk 8 with apache tomee 1.7.4.
The problem i have come across came up i tried to implement logging for a specific functionality.
The functionality requires me to create a log for each user where the write path for the log is determined by the username (obtained from the active user session).
I've reviewed a ton of documentation & implementation for the common logging libs for java.
The common problem for all different implementations, however, is that whenever user1) and user2) have to both log an event at the exact same time,
the messages maintain to be unique for them, but the path is not preserved, so for example the message for /opt/weblog/user1/web.log goes to
Having this said, imagine what happens with 50 users.
I've been trying to solve this in so many different ways, im not sure i can even list them all.
Right now what im doing some something like:
Conf(looks like this for debugging purposes & definitely is not the final version):
By documentation, the async appender shown as an example here: https://logging.apache.org/log4j/2.x/manual/webapp.html works incredibly slowly & the api has been changed since the docs were last updated, so effectively the shown implementation is not possible in log4j2 2.11.
Can anyone demonstrate an implementation with any logging lib, where this issue does not happen, or just maybe explain whats wrong with this one?