Logging
The portal is logged using the standard central logging system of the J2EE Engine, consisting of the Log Manager, Log Configurator Service and Log Viewer.
All the log data is written in the following directory:
<SAPj2eeEngine_install_dir>/<server or dispatcher>/log/
Logging is based on the SAP logging API.
For detailed
information about standard SAP logging for the J2EE Engine, see
Logging.
The special features of portal logging are described below.
The logging and tracing concept is divided into Categories and Locations. Categories contain log information for the system administrator and are used to check the system status. Locations contain trace information that is intended for the developer. They are used to help check the program flow and to detect program errors.
The following conventions are used in the portal:
Category (Logging) = /System/Server
Location (Tracing) = com.sap.portal.<logical_name_of_functionality>

com.sap.portal.pcd = Entry point for all trace information of the Portal Content Directory
com.sap.portal.prt = Entry point for all trace information of the Portal Runtime
The settings for
logging and tracing are stored in the Portal Runtime Service in file
log-configuration.xml and can be changed using the Log Configurator of
the J2EE Engine. For more information see
Log
Configuration.
The logging and tracing structure was changed in the SAP NetWeaver Support Package Stack 04 release. In the past, the settings were stored in file logger.xml in the portal application and displayed and configured with the Logging Console in the portal. With Support Package Stack 04, the Logging Console was removed from the portal. Information is read from the file logger.xml and the locations are created directly in the Log Configurator Service of the J2EE Engine.
The assignment of the information from logger.xml to the Log Configurator Service takes place according to fixed rules. If the location defined in logger.xml does not exist, a new location is created in the Log Configurator Service by placing the prefix com.sap.portal in front of the existing location name.

Location in logger.xml = mylogger is changed to a location in Log Configurator Service com.sap.portal.mylogger. The display in the Log Viewer of the J2EE Engine also appears under com.sap.portal.mylogger.

Note that some parameters in the previous PRT Logger definition are no longer valid and some parameters were changed:
The location severity now depends on two parameters: „is active“ and „level“. Only if the parameter is set to „is active“ (true) can the location severity be defined with parameter „level“. If „is active“ is not true, the location severity is not defined („None“).
Parameters „filename“, „pattern“, „append“ and „limit“ are ignored. The portal application only uses the portal destination service_com.sap.portal.prt.sapj2ee_portalTrace and a predefined log formatter.
You can find an example for the location structure of PRT and PCD components in log-configuration.xml as well as an example for logger.xml below.
A single trace file is created with the default setting of the J2EE Engine. All trace information is written to file defaultTrace.trc in directory \usr\sap\<SID>\JC<InstNo>\j2ee\cluster\server<n>\log on the J2EE Server.
This means that the log destination service_com.sap.portal.prt.sapj2ee_portalTrace defined in log-configuration.xml for portal logs is not active. The portal trace information is also stored in file defaultTrace.trc.
To activate the log destination for portal logs, start the Log Configurator of the J2EE Engine:
· Choose Cluster Data → Instance No → Server No → LogManager
· Change the value of property ForceSingleTraceFileto NO.
· Restart the J2EE server.
The portal trace information is stored in file portal.trc in directory \usr\sap\<SID>\JC<InstNo>\j2ee\cluster\server<n>\log\applications\portal\.
For more
information see
Logging.
com.sap.portal.pcd
¡ Acl
¡ BasicRoleFactory
¡ BasicTransport
¡ GI
¡ Access
¡ AclCache
¡ Admin
¡ Aspekt
¡ EventHandling
¡ Notification
¡ Basic
¡ Engine
¡ Object
¡ Xfs
¡ Pl
¡ Access
¡ Transport
¡ Xfs
¡ Cache
¡ Search
¡ Lock
¡ PlConnectionPool
¡ RoleNavigation
¡ SoftCache
¡ Access
¡ CleanUP
¡ CrossServer
com.sap.portal.prt
¡ naming
¡ notification
¡ request
¡ cache
¡ event
¡ hooks
¡ pom
¡ runtime
¡ broker
¡ deployment
¡ loader
¡ services
¡ facilities
¡ servlet_jsp
<Logger name=“my_logger“
loggerInterface=“com.sapportals.portal.prt.logger.ILogger”
locationName=”com.sap.portal.my
pattern=”%d # %20t %15s %m #”>
<LoggerClass
className=”com.sapportals.portal.prt.logger.SimpleFileLogger”
level=“ALL“>
<param filename=”logs/portal.log”
append=“false“ limit=“800000“>
</param>
</LoggerClass>
</Logger>
In this example, the PRT logger „my_logger“ is defined. The information is displayed in the J2EE Log Viewer under com.sap.portal.my.