Logging is a process of creating and storing a permanent record of events that can be reviewed, printed, and analyzed. This record usually contains the following information:
● the source of the record.
● a timestamp of the event a message.
● a severity, which specifies the importance of the record.
Log messages are used by system administrators to identify problems in the system operation. Therefore logs are always switched on and get written automatically. They have predefined granularity (severity) that can be modified during runtime.
Tracing is a process of writing detailed information about an operation to an output file. The trace facility provides:
● a detailed sequence of statements that describe the events of an operation as they are executed.
● diagnosing of an abnormal condition.
Traces are used by support engineers and developers. Therefore tracing is not normally turned on. Traces can be switched on if a problem has occurred and a detailed analysis of a distinct part of a program is necessary.
Log Manager is a module that manages the process of logging system events. The Log Manager is part of the Java Enterprise Runtime and is the first manager to be started at system startup.
By using the Log Manager properties, you can reconfigure the default system log archiving and tracing behaviour.
To control the log output, you need a log controller. It is an object that manages the writing of log and trace messages. Two types of log controllers are available:
● Category – describes messages specific to distinguished problem areas. It is used to emit log messages. Typical problem areas are: databases, networking, security auditing, and others.
● Location – describes messages that originate from delimited source code areas. It is used to emit trace messages.
Log and trace messages are written in destinations, also known as logs. Destinations are predefined by the SAP Logging API. Each log destination type can print messages in the following formats: TraceFormatter, XMLFormatter, and ListFormatter.
More information: Log (Destination) and Formatter.
An important part of any log and trace message is its severity. This denotes the level of importance or relevance of a certain message. Logs and traces can be limited to certain severity levels, that is, only data of a defined severity is collected. The increasing order of the severity levels is:
● DEBUG – For debugging purpose, with extensive and low level information
● PATH – For tracing the execution flow
● INFO – Informational text, mostly for echoing what has already been performed
● WARNING – The application can recover from an anomaly and fulfill the required task, but needs attention from a developer/operator.
● ERROR – The application can recover from an error, but it cannot fulfill the required task due to the error
● FATAL – The application cannot recover from an error, and the severe situation causes fatal termination.
Log controllers are also identified with certain severity.
You can:
● Configure log controllers, destinations and formatters.
More information: Log Configuration.
● View all available logs and traces in AS Java.
More information: Log Viewing.
● Develop logging for your own application using the SAP NetWeaver Developer Studio.
More information: How to Write Log and Trace Messages .
● Enable the logging and the output messages of your application. To do this, use the SAP Logging API. It works with several general terms that provide an abstraction for the different entities involved in the logging and tracing process.
More information: SAP Logging API.
● Perform some advanced logging tasks by using the LOG group of shell commands.
More information: LOG.