Show TOC Start of Content Area

Background documentation Multi-Threading  Locate the document in its SAP Library structure

Use

The SAP Logging API works successfully in a multi-threading environment. The thread ID is stored with the message and can be displayed or masked in the output.

Note

Recall the configuration that can be done for TraceFormatter, where you can specify if the format pattern includes the thread ID or not.

A sample output in trace format:

This graphic is explained in the accompanying text

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod [Thread-0] Fatal: A fatal message

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod [Thread-1] Fatal: A fatal message

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod2 [Thread-1] Error: An error message

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod [Thread-2] Fatal: A fatal message

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod2 [Thread-0] Error: An error message

Jan 01, 2001 10:10:00 PM      com.sap.fooClass.fooMethod2 [Thread-2] Error: An error message

 

 

 

End of Content Area