Use
This object enables you to transfer messages to the mapping trace. If the trace level is set correspondingly (see Displaying/Changing Configuration Data), then the trace is visible in message monitoring (transaction SXMB_MONI). The execution of the mapping is not interrupted when the entries are written to the trace.
Integration
To get a global container object, call the getGlobalContainer()method for the Container Object.
Features
All methods for the trace output were previously encapsulated in the MappingTrace class. The class AbstractTrace has since been introduced, however. This class inherits all methods of class MappingTrace and also introduces the method addDebugMessage(). Use the AbstractTrace class to call all the methods listed below. Despite this, the term MappingTrace object is also used in this documentation.
You can transfer messages for two different trace levels:
Methods of the AbstractTrace Object
Method | Use |
void addInfo(String message); | Adds a message message to the mapping trace with the trace level info. |
void addWarning | Adds a message message to the mapping trace with the trace level warning. |
void addDebugMessage (String message); | Adds a message message to the mapping trace with the trace level debug. |
You can display the messages that you write to the trace with these methods in the test environment, for example. You can also set a trace level for each pipeline in the Integration Engine (see: Displaying/Changing Configuration Data) so that the trace messages are written to the trace header of the message at runtime. The trace levels 0 to 3 are associated with the trace levels info, warning, and debug specified as follows:
Trace Level of the Pipeline and Mapping Trace
Pipeline | Mapping Trace |
0 | No trace |
1 | addWarning()- Entries written to trace |
2 | addWarning()and addInfo()- Entries written to trace |
3 | addWarning()and addInfo()and addDebugMessage()- Entries written to trace |
For example, if the pipeline trace level is set to 0, no messages are written to the trace header at runtime; this also applies even if you transfer text to the mapping runtime in the mapping program by using the method addWarning().
No comments:
Post a Comment