Logging and tracing options for SPL application developers
SPL application developers can write messages to product log and trace files. Log and trace files help administrators, instance owners, application developers, and the support team to identify, diagnose, and resolve problems with the Teracloud® Streams and applications.
Logging is the recording of translatable serviceability information that pertains to product or application events. Administrators and SPL application developers use logs to troubleshoot problems for items that they can potentially control. Tracing is the recording of product or application internal events and data. SPL application developers use trace data to debug stream application.
Logging options
SPL application developers can use the appLog function from the SPL standard toolkit. The appLog function writes messages to the Teracloud® Streams product log location. The standard toolkit also provides an isLoggable function to determine whether a message is logged at a specific level. Using this function can avoid construction of log messages when the message is not logged.
SPL primitive operator developers can use the log facilities that are provided by the C++ and Java™ operator APIs.
Tracing options
SPL application developers can use the appTrc functions from the SPL standard toolkit. The appTrc function is used for application debugging, and writes the trace message to a PE trace file for the application. The standard toolkit also provides an isTraceable function to determine whether a message is logged at a specific level. Using this function is optional, but can help avoid construction of trace messages when the message is not traced.
SPL primitive operator developers can use the trace facilities that are provided by the C++ and Java™ operator APIs.
SPL application developers can use the tracing
config to specify six trace level
severities: off
, error
, warn
,
info
, debug
, and trace
. Setting the
tracing
config level to a particular value enables all trace messages at that
level and at any level that is less verbose.