Zum Hauptinhalt springen

Logger

Category: Monitoring
Node id: logger

Provides structured logging with buffering, querying, and multiple output destinations

What it does​

  • Structured logging with JSON, text, and structured output formats
  • Log levels: debug, info, warn, error, fatal
  • Multiple output destinations: stdout, stderr, discard, or file path
  • Log buffering with flush, query, and clear operations
  • Contextual fields, tags, trace ID, and span ID attachment
  • Query buffered logs by level and message substring filters

Use cases​

  • Log pipeline step results for debugging and audit trails
  • Buffer logs during batch processing and flush at completion
  • Write structured JSON logs to file for external log aggregation
  • Attach distributed tracing context (trace_id, span_id) to log entries
  • Query buffered logs to generate pipeline execution summaries

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
messageanyNoLog message (overrides config message)
contextjsonNoContextual data to attach to the log entry
fieldsjsonNoStructured fields to attach to the log entry
tagsjsonNoTags to attach to the log entry

Output ports​

NameTypeRequiredDescription
resultjsonNoFull log result with entries, summary, and metadata
loggedbooleanNoWhether the message was written immediately
successbooleanNoWhether the operation succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
OperationoperationenumNologlog, debug, info, warn, error, fatal, buffer, flush, query, clearLogging operation to perform
LevellevelenumNoinfodebug, info, warn, error, fatalLog severity level
FormatformatenumNojsonjson, text, structuredLog output format
MessagemessagetextNoStatic log message (overridden by input)
Output DestinationoutputstringNostdoutOutput destination (stdout, stderr, discard, or file path)

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Trace IDtrace_idstringNoDistributed trace ID to attach
Span IDspan_idstringNoSpan ID to attach
FieldsfieldsjsonNoStatic structured fields
TagstagsjsonNoStatic tags
Level Filterlevel_filterstringNoFilter buffered logs by level (query operation)
Message Filtermessage_filterstringNoFilter buffered logs by message substring (query operation)
LimitlimitnumberNo100Maximum entries to return (query operation)

Errors​

CodeDescription
MISSING_MESSAGELog message is required but was not provided in config or input
UNSUPPORTED_OPERATIONOperation is not one of the supported logging operations
UNSUPPORTED_FORMATLog format is not one of: json, text, structured
LOG_WRITE_FAILEDFailed to write log entry to the configured output destination

Runtime notes​

  • logged=false for buffer/query/clear operations — the message is held in memory, not written
  • Buffer is in-memory and per-node-instance; use flush to write all buffered entries at once
  • result.entry is present for single-log operations; result.entries is present for flush/query
  • File output destinations auto-create parent directories and append to existing files

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

Etwas unklar? Senden Sie Feedback zur Dokumentation per E-Mail..