I am trying to use this pattern to create a dynamic file name: "Debug_%property{LogUserName}.txt"
The value of %property{LogUserName} is retrieved from log4net.LogicalThreadContext.Properties["LogUserName"], which is filled when the user logs in.
In the first time, it works perfectly. The file gets named like Debug_user1.txt (for example).
If user1 disconnects, and the user2 logs in (at the same browser) a new file should be created, but it's not happening.
It seems that the LogicalThreadContext.Properties are final variables, and can't be changed at runtime.
I tried to change the FileAppender.File property, but it doesn't work too.