title: How to log messages in Java web app and view logs by session, request, in a tree?
body: <p>Currently, in my web app logs, I have big text files full of messages. They are difficult to use in debugging and analysis. I'm imagining the following, and I'm wondering, does it already exist, or do I need to build it?</p>
  
  <p>I want to have log messages associated with the current request and session so that I can view a log in a UI as a collapsible tree.  At the summary level I might view by user/session and under those see requests with the total time spent in the request.  From there I can drill down into a request and see the log messages at deeper levels.  Requests that contain warnings or errors would be highlighted or selectable with a filter.</p>
  
  <p>I also want the system to be extensible and not a black box. I want to connect asynchronous tasks to sessions/requests even if those things were happening in other threads.  And I want to integrate this with client side Javascript errors. That is another issue, but the point is I need something extensible.</p>