!--a11y-->
Monitoring and Displaying Log
Files 
You can use the CCMS (transaction RZ20) to monitor log files and have notification sent to you if an error occurs.
You should also regularly display the following log files, to study the messages that are not classified as errors, and to maintain an overview of the processes in the system:
<Directory of the J2EE Installation>/j2ee/cluster/server0/log/system/database.log
/security.log
/server.log
/application/<main applications>.log
The SAPCCMSR agent with the –J2EE option monitors all of the log files registered with the Logging API for particular specified search patterns and triggers alerts in the CCMS if they occur. The “Log Monitors” are displayed in the CCMS Alert Monitor and should be regularly checked.

As an administrator, it is in general possible to be informed automatically by the CCMS if alerts occur.
For more information about this, see
Monitoring J2EE Log
Files in the CCMS.
All log files that are registered with the Logging API of the J2EE Engine are displayed in the Log Viewer, along with a trace file in which all activated traces are written.
You can see in the Log Viewer in which log files new entries have been made: to do this, open the Log Viewer Service in the Visual Administrator.
Switch from the structure view to the table view (
) and double-click the header row of the New Records column. The system now displays the log
files in which there are new entries.
You can open the files by double-clicking them.

For more information about additional functions of the Log Viewer, see the
administration manual under
Log
Viewer.
Logging API traces are activated using the
Log Configurator
Service. There is a trace file for each server and dispatcher, in which
all trace data is written. These
<Server/Dispatcher>/log/defaultTrace.trc are of the type
“ListLog” and you can display them in the Log Viewer.
You have the following options for searching for and analyzing errors that are not directly triggered in the J2EE Engine, but which are connected to the application or the database:
·
Application
Tracing: You can activate and evaluate the Application Trace using the
Application Trace
Service.
·
Single Activity Trace: The Single Activity Trace is activated from the application (such as EBP or
CRM) using its functions. You can then also evaluate it using the Log
Viewer.
· SQL Trace: The SQL Trace can be activated using the Visual Administrator in the Log Configurator Service or using the alias SQLTrace through an HTTP request to the J2EE Engine (such as http://localhost:50000/SQLTrace). You can evaluate the trace either using the Log Viewer or using the alias above; that is, using the Web front end.
· Analyzing "Java dumps" (Stack Traces in Developer Traces)
For information about using the Log Viewer, see the administration manual
under
Log
Viewer.
If the J2EE Engine is not running, you cannot view the log files with the integrated Log Viewer, but must rather use the Standalone Log Viewer. The Standalone Log Viewer is part of the installation of the SAP Web AS (Java) and is in the directory <Directory of the J2EE Installation>/<SysID>/JC<no.>/j2ee/admin/logviewer_standalone.
You must start the Standalone Log Viewer Server on the host on which the J2EE
Engine is installed. You can then use the Standalone Log Viewer Client to
connect to the Standalone Log Viewer Server and call the log files that you
want to view. You can also register the Standalone Log Viewer Server as a
service. For information about operating the Standalone Log Viewer, see the
administration manual under
Log
Viewer.

If you have access to the file system of the host on which the J2EE Engine is installed, you can, of course, also open the log files directly from the file system.
