I have a j2ee web application which uses log4j for logging. I want to have a log viewer on the admin page. This should allow the users to view the log4j logs on the application UI. Does anyone know how can this be implemented in java, maybe, - realtime scrolling logs would be great, - otherwise lets say last 500 lines of logs with manual refreshes can be done. The issue with the latter using file operations is that i am not sure how long each refresh would be as the log file can be 10 MiB in size before log4j generates a new file.
What would be the best way to do it. any pointers would be great.. Thanks