Blogroll
A great source of information for Lotus Domino administrators
Jeff Potts' excellent ECM/Portal blog
Lots of very useful Alfresco articles
| Liferay Portal - Log Levels for Third Party Portlets |
|
|
|
| Written by Nathan McMinn |
| Monday, 07 June 2010 10:26 |
|
If you are developing your own portlets for Liferay, you have surely noticed that your portlet log statements don't show up in the logs by default. Or, like me, you may have moved a portlet from test to production only to have it fail. When you are running with a debugger attached, it's a simple matter to set a breakpoint and see where things are going wrong. On a production server, this isn't really an option. You need detailed, fine-grained control over your log configuration. Liferay can output logging as detailed as you want, class by class or package by package. These can either be set using portal-log4j.xml, an extension file or (my preference), the server administration console. Changes made via the administrative interface can be applied immediately, without a server restart, making it the best choice for troubleshooting in a live environment.
To get started, open the main portal menu and select "Control Panel". At the bottom of the left side menu there is a "Server Administration" option which takes you to the following screen:
At the top of this page is a "Log Levels" option. This tab allows the user to set the log level for various classes and packages. Each "category" can consist of either a package name (at any level) or even a specific class.
To enable logging for a specific custom portlet, click the "Add Category" tab.
In the text box, enter the package name of your portlet class. In this example I am using the package "com.um", which is the base package for the Alfresco Web Script Portlet. This will turn on logging for any classes that reside in the package hierarchy beginning with "com.um", including the main portlet class com.um.portlets.alfresco.WebscriptPortlet and the proxy servlet class com.um.portlets.alfresco.servlets.ProxyServlet. Next, select your log level. These correspond with the log levels defined by Log4j. Click "Save" to create the new category and apply the change.
Once the category is saved, it can be seen in the category list. From this list you can adjust the log level. When you are done debugging, go back in and set it to "Info" or another category.
More info on this topic can be found in the Liferay Wiki. |
| Last Updated on Monday, 07 June 2010 11:39 |
About Me

My name is Nathan McMinn. I'm a software engineer, beer geek, wannabe adventurer and genuinely curious guy. Find me on Facebook, Linkedin or Twitter
Latest Comments
- Storing and Retrieving Images ...
Hi, Thanks for your tutorial. it suggestion really... - Alfresco PDF Toolkit - Digital...
It will be very useful, if at one go I can digital... - Integrating Alfresco Content i...
Hola estoy trabajando con el módulo de drupal CMIS... - Integrating Alfresco Content i...
Hola estoy trabajando con el módulo de drupal CMIS... - Calling Web Services from the ...
Nvm - resolved it - needed to restart browser for ...




