Logger
Description
This component allows insert a message into the processing log. In Nussknacker Cloud, the messages in the processing log can be accessed via the Admin Panel (Admin in the user menu).
The scenario name and the node name are not added to the message itself - they form the name of the logger the message is written to: scenarios.<scenario name>.<node name>.
The component logs only when the Debugging switch is on; when it is off, nothing is logged and the message expression is not evaluated. Debugging is not a node parameter: it is set in the deploy dialog under Advanced parameters, pre-filled as on, and grouped per component, so one switch covers every Logger node in the scenario.
The message expression is also skipped when the selected level is disabled for the node's logger.
Each emitted message carries structured logging context (MDC): nu_log_source=log-node,
scenario_name, node_id, node_name and context_id. When the incoming record has a NU trace ID,
it is included as correlation_id. These fields are separate from the message; configure
your logging layout and collector to preserve them. Scenario variables are not copied into
the logging context.
The correlation ID preserves the existing trace-id header supported by HTTP and Kafka Lite
sources. It is not an OpenTelemetry trace ID. A context ID identifies processing within an
engine run and can repeat after a restart; it is not a globally unique event identifier.
See Scenario logs for filtering, runtime events and correlation.
Parameters and configuration
| Name | Description |
|---|---|
| Message | The message to be added to the log |
| Level | The level the message is logged at: TRACE, DEBUG, INFO, WARN or ERROR. It is an advanced parameter and defaults to INFO. |