Is there a way of debugging JSF + PrimeFaces applications by simply looking at one log file? To be more specific, here is how I personally do it at the moment if something doesn't work as expected:
p:message
on the form and display it.For me, checking for errors is a 4-step workflow. Is there a better way of doing this? Ideally, it would be great if all these errors could be logged to a single log. Is this DIY or there is some standard way of doing it?
Thanks!
There is nothing out of box that will give you what you describe because these are all situations that occur on different layers.
This is typically because an unhandled exception made its way up the call stack. If you improve your code for exception handling then these circumstances should be caught and logged.
Improved exception handling and logging at all application layers will help capture all errors and exceptions in a single log file on the application server.
Firebug catches network errors in asynchronous postbacks as well as Javascript exceptions. This is completely a client side concern as the server just derives the markup. It might be possible to catch all Javascript exceptions before they are propagated up to Firebug and to send an asynchronous error report to the server for the server to log. This shouldn't be too terribly difficult to implement.
Again, better logging in your validator methods will be able to put this information in the application server logs so that you have all of this information in one place.
The bottom line is that these are all situations where they become a non-issue for developers who learn how to intuitively include good Instrumentation code throughout their applications.
Hi i am also developing an application using jsf and primefgaces. I also had faced this problem earlier. Now i am using log4j to log all the errors/exceptions/ doubts into a single file. It is also very easy to use it.You can have a look at it, it may solve your problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With