Logging
Logging must be implemented with the PRT Logging API. Printing to the standard output streams will slow down performance and the information is hardly noticed by the administrator. The logging API of the portal generates diagnostic information in an efficient way and stores the information in a database for easy retrieval.
The preparation of the logging messages can take some time to collect and format the information. Avoid unnecessary overhead by checking the log level before you request additional information. Benefit from the hierarchy of the log levels (inclusion relationship).

The levels can be described in a mathematical formula as follows:
SEVERE Ì WARNING Ì INFO Ì ALL.
For a Java program this can be translated int the integer value associated with the level:
SEVERE.intValue()<WARNING.intValue()<INFO.intValue()<ALL.intValue()
A special level is the pseudo-level OFF (not in the picture) that indicates that logging is turned off. It has the lowest integer value, so no extra checking is required. Therefore a message of level m is logged when the configured logging level L is greater or equal: L = m.
ILogger lg = PortalRuntime.getLogger(); // get default logger |