I'm looking to setup lossy logging (on a high traffic website) on a per user (or per request) basis. E.g The application logs nothing until an error occurs when all logs are then written to a file (or db).
I have been playing around with the BufferingForwardingAppender but it looks like it buffers all logs sent to it (not per thread or per request), so on a high traffic site this could be a combination of multiple user's log messages. On a busy site other users log messages could completely push the useful logs out of the buffer. Has anyone done anything similar? Are people using lossy logging on a high volume website? Would you recommend this approach? Any ideas how I might achieve this? Thank you for your help in advance!