This feature is available from 2.3.0 only, as part of the cxf-rt-management-web component
LogBrowser is log entries viewer. It is rich internet application which can be embedded in your web application. Configure what log entries you would like to see and view them in your favorite browser. Anytime, anywhere without using console. Let's make brief overview how to configure LogBrowser inside your application.
Configuring LogBrowser application in container without Spring
Add cxf-rt-management-web dependency to your Maven project (if you don't use Maven as management tool, omit this step and add cxf-rt-management-web library manually):
Add new class to your project, LogBrowserApp. Add content from sample below.
We have to modify newly created class a little bit:
- Go to line 1. Replace yourpackage phrase with a valid package.
- Go to line 23. Configure which log entries should be caught. If you would like to catch all log entries related with your application at the INFO level, simply replace yourpackage phrase with your application's package. For more information how to configure custom loggers go to AtomPullServer description.
- Go to line 32. Add all required users. Keep in mind that each user has his own independent configuration.
Add new servlet definition to your web.xml file, like in sample below:
Go to line 13 and replace yourpackage phrase with a valid package.
Rebuild and run your application.
Open browser and go to URL:
Add new endpoint with URL:
Congratulation. Now you can easily view log enties using LogBrowser.
For more details about configuration go to sample project.