Show TOC

Background documentationLogging Features Locate this document in the navigation structure

 

The following main features help you to manage your logging functionality and activities.

Features

Logging

Logging is a process of creating and storing permanent records of events that can be reviewed, printed and analyzed. Log records provide the following common information:

  • a short descriptive message

  • a timestamp of the event

  • the source of the record

  • the log controller

  • a severity, specifying the importance of the record

  • the host, system and instance name

  • the server process

Log files are used by system administrators to identify problems in system operations. Therefore, logs are always switched on and get written automatically. They have predefined granularity (severity) that can be modified during runtime.

Tracing

Tracing is a process of writing detailed information about an operation to an output file. Trace records provide the following:

  • a detailed sequence of statements that describe the events of an operation as they are executed

  • diagnosing of an abnormal condition

Trace files are used by support engineers and developers. Therefore, tracing is normally turned off. 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

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.

Using the Log Manager properties, you can reconfigure the default system log archiving and tracing behavior.

Control of the Output

To control the log output, you need a log controller. It is a Java 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

Levels of Severity

An important part of any log and trace message is its severity. It 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 announcing what has 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 situation causes fatal termination.

Note Note

Log controllers are also identified with certain severity.

End of the note.
Message ID

Message ID is a unique identifier assigned to each log/trace message, generated in the AS Java. The uniqueness of the concept do not allow two logs/traces to have one and the same Message ID assigned.

A Message ID represents the following string: [prefix] : [range] [number], where:

  • prefix – a meaningful word or abbreviation concerning an AS Java component.

  • range – a two-symboled combination that consists of number and lowercase Latin alphabet characters.

  • namespace – this is equal of <prefix + range>. It is unique for each Message ID, too.

  • number – a number from 0 to 9999 with leading 0s. The first number is ‘0000’ and the last possible number in a range is ‘9999’. Each Message ID has unique number in the range.

Activities

Using logging functionality, 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 applications 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.

    More information: SAP Logging API

  • Perform some advanced logging tasks by using the LOG group of shell commands.

    More information: LOG