4.5 Log Files

 < Day Day Up > 



4.5 Log Files

Another area that is different from the distributed platform is the location where the portal server log files are stored. On the z/OS and OS/390 platform the portal log files can be found in <WPS_HOME>/log. On our system that was /PortalServer/log, and the log files are named wps_<yyyy.mm.dd-hh.mm.ss>.log.

If you develop your own portlets, they are able to write to this log by using the PortletLog object from the Portlet API (Example 4-1 on page 137).

Example 4-1: Using the Portal log from a portlet

start example
 PortletLog log = getPortletConfig().getContext().getLog(); if (log isDebugEnabled()) log.debug("Debug enabled:" + debugMsg); if (log isWarnEnabled()) log.debug("Warnings enabled:" + warningMsg); if (log isInfoEnabled()) log.debug("Info enabled:" + infoMsg); if (log isErrorEnabled()) log.debug("Error enabled:" + errorMsg); 
end example

It is also possible to use typical Java console statements such as System.out.println("My debug statement"); which will show up in the SYSPRINT (JES2 JOB LOG) for the portal server region.



 < Day Day Up > 



Websphere Portal on Z. OS
Websphere Portal on Z/OS
ISBN: 0738499382
EAN: 2147483647
Year: 2003
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net