Portlet API 2

org.apache.jetspeed.portlet
Interface PortletLog


public interface PortletLog

The PortletLog provides the portlet with the ability to log information, warning, or error texts. The log is maintained by the portlet container. The type and location of of the log is a matter of implementation. Also, whether logging is enabled or not is at the discretion of the portlet container.

 ...

 PortletLog log = iContext.getLog ();

 if (log.isEnabled)
     log.warn ("Can access the content source");

 ...
 


Field Summary
static boolean isEnabled
          A variable indicating whether the portlet log is enabled.
 
Method Summary
 void error(String aText)
          Logs the given error text in the portlet log.
 void error(String aText, Throwable aCause)
          Logs the given error text, cause, and a stack trace in the portlet log.
 void info(String aText)
          Logs the given informational text in the portlet log.
 boolean isEnabled()
          Returns whether the portlet log is enabled.
 void warn(String aText)
          Logs the given warning text in the portlet log.
 

Field Detail

isEnabled

public static final boolean isEnabled
A variable indicating whether the portlet log is enabled.
See Also:
isEnabled()
Method Detail

isEnabled

public boolean isEnabled()
Returns whether the portlet log is enabled.
Returns:
true if the log is enabled,
false
See Also:
isEnabled

info

public void info(String aText)
Logs the given informational text in the portlet log.
Parameters:
aText - the informational text to log

warn

public void warn(String aText)
Logs the given warning text in the portlet log.
Parameters:
aText - the warning text to log

error

public void error(String aText)
Logs the given error text in the portlet log.
Parameters:
aText - the error text to log
See Also:
error(String,Throwable)

error

public void error(String aText,
                  Throwable aCause)
Logs the given error text, cause, and a stack trace in the portlet log.
Parameters:
aText - the error text to log
aCause - the cause for logging
See Also:
error(String)

Portlet API 2