I’d like to remotely monitor the activity of my Java EE application (deployed on a glassfish server).
Basically, I want my client-side implemented using Vaadin to display logs about the server-side activity.
The user would like to know what’s happening on the server side…These logs should only be high-level informative messages
I guess it really depends on the logging framework used if any. I’ve seen Chainsaw for log4j but this is a client on its own.
Otherwise, I could remotely read a file line by line (like tail -f)…but I don’t know how to do that either.
What’s the best solution to achieve this kind of thing?
In general what you could do is simply use a Vaadin Label, read a log file infinitely (or rather until stopped) and append the file content to the label. Here is code for a for that does exactly this:
For this to work you need a “RAW” mode Label and a ProgressIndicator that polls the server:
Disclaimer: this code was from a non-critical application and for example error handling and HTML escaping is missing.