LoggerNodeConfiguration
Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Nodes.Transforms
Configuration for node logger: writes one log line per execution of the node, with a static message or a message read from the data context, at a chosen level and with structured attributes.
public record LoggerNodeConfiguration : NodeConfiguration, INodeConfiguration, IEquatable<NodeConfiguration>, IEquatable<LoggerNodeConfiguration>
Inheritance Object → NodeConfiguration → LoggerNodeConfiguration
Implements INodeConfiguration, IEquatable<NodeConfiguration>, IEquatable<LoggerNodeConfiguration>
Remarks:
Exactly one of LoggerNodeConfiguration.Message and LoggerNodeConfiguration.MessagePath must be set. The log body is
<nodePath>: <message> like every other pipeline log line; the message is logged as
a value, so braces such as {0} are kept verbatim. The node passes the attribute
NodePath, plus TenantId and PipelineRtId when the execution's
IEtlContext can be resolved (always in the mesh adapter and the SDK adapter host),
followed by the configured LoggerNodeConfiguration.Attributes. They reach the log record when the pipeline
logger keeps structured attributes, as the SDK's default pipeline logger does; a custom
IPipelineLogger or INodeContext that does not override Log
with attributes drops them.
Missing data never fails the node: a missing or null value is logged as LoggerNodeConfiguration.MissingValue. Values registered as secret in the execution are masked. The message is limited to LoggerNodeConfiguration.MaxMessageLength characters and every attribute value to LoggerNodeConfiguration.MaxAttributeValueLength; a longer text is cut and ends with LoggerNodeConfiguration.TruncationMarker. At most LoggerNodeConfiguration.MaxAttributes attributes are allowed. Do not log personal or secret data.
Fields
DefaultMissingValue
The value logged for a missing or null message or attribute value unless LoggerNodeConfiguration.MissingValue is set.
public static string DefaultMissingValue;
TruncationMarker
Text appended to a message or attribute value that was cut to its maximum length.
public static string TruncationMarker;
MaxMessageLength
Maximum number of characters of the message (2 KB); longer messages are truncated.
public static int MaxMessageLength;
MaxAttributeValueLength
Maximum number of characters of an attribute value; longer values are truncated.
public static int MaxAttributeValueLength;
MaxAttributes
Maximum number of configured attributes; more is a configuration error.
public static int MaxAttributes;
Properties
Message
Static message to log. Either this or messagePath must be set, not both. Logged
verbatim: braces are not placeholders.
public string Message { get; set; }
Property Value
MessagePath
JSONPath to the message in the data context, e.g. a text built by FormatString@1. Either this
or message must be set, not both. A string is logged as it is, any other value as
compact JSON; a missing or null value as missingValue.
public string MessagePath { get; set; }
Property Value
Level
Log level of the line: Debug, Information, Warning or Error. Default: Information.
public LoggerNodeLevel Level { get; set; }
Property Value
Attributes
Structured attributes of the log line, at most 20. Each has a name and either a static
value or a valuePath into the data context (valuePath wins when both are
set). Values are limited to 256 characters. Names are unique (ignoring case); TenantId,
PipelineRtId and NodePath are set by the node, and the fields of the JSON log line (timestamp,
level, logger, callsite, message, trace_id, span_id, exception.*) and names starting with "{" cannot be used either.
public List<LoggerNodeAttribute> Attributes { get; set; }
Property Value
MissingValue
Text logged for a missing or null message or attribute value. Default: <missing>.
public string MissingValue { get; set; }
Property Value
Description
Gets or sets an optional description
public string Description { get; set; }
Property Value
Constructors
LoggerNodeConfiguration()
public LoggerNodeConfiguration()