Log Output Adapter

Overview

The Log output adapter is an embedded adapter that sends its input tuples to both its output port and to the StreamBase Java logging system, which is described in Using Logging in Java Code. Think of the Log adapter as a T-joint adapter, which passes its input unchanged to its output port, but also sends a copy of each input tuple to the logging system.

Ports

An instance of the Log adapter has a single input port and a single output port. This is a pass-through adapter, so the schema of the output port is always the same as the schema of the input port.

Properties

General Tab

The Log adapter has the following properties on the General tab in its Properties View in StreamBase Studio:

Property Data Type Description
Name string Specify a unique name for this adapter instance.
Adapter Name read-only field The formal name of the adapter.
Class read-only field The fully qualified class name that implements the functionality of the adapter. Use this class name when loading the adapter in StreamSQL programs with the APPLY JAVA statement.
Start with application Checkbox If enabled, this adapter instance starts as part of the containing StreamBase Server instance. The default and recommended setting is enabled.
Enable Error Output Port Checkbox Check this box to add an Error Port to this adapter instance. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports and Error Streams in the Authoring Guide to learn about Error Ports.
Description string Optional. Enter text that describes the purpose of this adapter instance in your application. Text entered in this field appears in the tooltip popup for the adapter's component in the EventFlow diagram.

Adapter Settings Tab

The Log adapter has the following properties on the Adapter Settings tab in its Properties View in StreamBase Studio:

Property Data Type Description
Log level pulldown list Specify the type of logging message you want to send to the logging system from this adapter. The choices are to send INFO, WARN, DEBUG, or TRACE log messages.
Message Identifier string The specified string is prepended to the log message for each tuple. You can use this feature with several instances of the Log adapter to prefix different strings to the log messages from different portions of your application. This would make the application's log file searchable for different logging messages from each application section.

Standard Tabs

The Log Adapter has the following standard tabs in its Properties View in StreamBase Studio:

Typechecking and Error Handling

Typechecking detects a value for the output that is null or unspecified.