Show TOC Start of Content Area

Background documentation How to Write Log and Trace Messages  Locate the document in its SAP Library structure

Use

This section will help you understand in detail the requirements of writing the content of log or trace messages.

The content of a message must be carefully designed, according to the addressees and the message type chosen. The difference between the two types of messages is:

      Log messages permanently record the events and status of a software system. Logs intended for a much broader audience with different skills and backgrounds.

      Trace messages analyze a software system in detail from a programmers standpoint as exceptional procedure. Traces are intended for persons with development skills and a deep understanding of the application.

More information: Logging and Tracing.

Prerequisites

You need to have basic knowledge of the SAP Logging API.

You also need to know the basic difference between categories and locations.

More information: SAP Logging API

General Design Issues

      Structure of messages

As part of the application design phase, it is a good practice to list the available messages or, if possible, design a common pattern for the message layout, to keep them as uniform as possible.

More information: Types and Content of Log Messages

                          Types and Content of Trace Messages

Recommendation

Since messages need to be translatable, it is a good practice to avoid abbreviations, complex sentences or messages that consist of multiple parts.

      Target groups and delivery channels

In general, there are multiple delivery channels for messages. Therefore, a message can be stored in a log or it can be delivered directly to the user interface informing the application user.

Caution

Technical infrastructure-related information must not be delivered to the user interface, since mostly the application user cannot handle the problem.

More Information

Example

 

End of Content Area