MarbleSoft.FlowModule.MQTTLogger 1.4.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MarbleSoft.FlowModule.MQTTLogger --version 1.4.1
                    
NuGet\Install-Package MarbleSoft.FlowModule.MQTTLogger -Version 1.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MarbleSoft.FlowModule.MQTTLogger" Version="1.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarbleSoft.FlowModule.MQTTLogger" Version="1.4.1" />
                    
Directory.Packages.props
<PackageReference Include="MarbleSoft.FlowModule.MQTTLogger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MarbleSoft.FlowModule.MQTTLogger --version 1.4.1
                    
#r "nuget: MarbleSoft.FlowModule.MQTTLogger, 1.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MarbleSoft.FlowModule.MQTTLogger@1.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MarbleSoft.FlowModule.MQTTLogger&version=1.4.1
                    
Install as a Cake Addin
#tool nuget:?package=MarbleSoft.FlowModule.MQTTLogger&version=1.4.1
                    
Install as a Cake Tool

MarbleSoft.FlowModule.MQTTLogger

MQTTLogger publishes log messages over MQTT and enriches flow messages with logging context. It reads log entries from a configurable source property, adds metadata (timestamp, module info, flow info), and publishes them to an MQTT broker.

How It Works

  1. Receives a message from the flow with a log entry at the configured source property (default: data)
  2. Extracts log level from the message payload or uses the configured default (default: Info)
  3. Enriches with metadata: adds timestamp, module ID, module name, flow ID, flow version, and the original payload
  4. Stores in flow message at the configured target property (default: data.logging)
  5. Publishes to MQTT using the configured topic and settings

Example Input

{
  "data": {
    "Msg": "Error in flow: division by zero",
    "LogLevel": "Error"
  }
}

Example Output (Flow Message)

{
  "data": {
    "Msg": "Error in flow: division by zero",
    "LogLevel": "Error"
  },
  "data.logging": {
    "LogLevel": "Error",
    "TimestampUtc": "2026-07-21T10:15:30Z",
    "ModuleId": "550e8400-e29b-41d4-a716-446655440000",
    "ModuleName": "ErrorHandler",
    "ModuleVersion": "1.0.0",
    "FlowId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "FlowVersion": "1.0",
    "Payload": {
      "Msg": "Error in flow: division by zero",
      "LogLevel": "Error"
    }
  }
}

MQTT Publication Example

When MQTT is enabled, the module publishes:

Topic: logging (default topic, configurable)

Message:

{
  "LogLevel": "Error",
  "TimestampUtc": "2026-07-21T10:15:30Z",
  "ModuleId": "550e8400-e29b-41d4-a716-446655440000",
  "ModuleName": "ErrorHandler",
  "ModuleVersion": "1.0.0",
  "FlowId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "FlowVersion": "1.0",
  "Msg": "Error in flow: division by zero"
}

Configuration

  • Source (default: data): Property path to read the log entry from
  • Target (default: data.logging): Property path to write the enriched log context to
  • DefaultLogLevel (default: Info): Log level when not specified in the message
  • Topic (default: logging): MQTT topic to publish to
  • Enabled: Set to true to enable MQTT publishing; when false, logs are only added to the flow message

Log Levels

Valid log levels (case-insensitive):

  • Debug
  • Info
  • Warning
  • Error
  • Critical

Settings

  1. Source
  • Type: string
  • Required: yes
  • Validation: min length 1, max length 256
  • Default: data
  • Purpose: path used to read an existing log context
  1. Target
  • Type: string
  • Required: yes
  • Validation: min length 1, max length 256
  • Default: data.logging
  • Purpose: path used to write the log context
  1. Default Log Level
  • Type: string
  • Required: no
  • Default: Info
  • Purpose: default level used when no LogLevel field is present in the message payload
  1. MQTT publish settings (optional)
  • Enable MQTT Publish: bool, default true
  • MQTT Source Property: string path, default data, if empty the payload from Source is used
  • MQTT Topic: string, required when MQTT is enabled, default logging
  • MQTT Brokers: comma or line separated host:port list, default localhost:1883
  • MQTT Protocol Version: enum V311 or V500
  • Use TLS: bool, default true
  • SSL Protocol: enum None, Tls12, Tls13
  • Allow Untrusted Certificates: bool
  • ClientId: optional string, generated automatically when empty
  • CA Certificate: optional Crosser Certificate credential selector
  • Client Certificate: optional Crosser Certificate credential selector
  • MQTT User Credential: optional Crosser UsernamePassword credential selector
  • QoS: AtMostOnce, AtLeastOnce, ExactlyOnce
  • Retain: bool

Runtime behavior

  • Reads payload from Source.
  • Creates a log context object with LogLevel, TimestampUtc, ModuleName, and Payload.
  • If payload contains LogLevel, that value overrides the configured default level per message.
  • Writes log context to Target.
  • Publishes log context to MQTT topic when enabled.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.6.1 35 9/15/2026
1.6.0 55 9/15/2026
1.5.9 76 9/14/2026
1.5.8 82 9/14/2026
1.5.7 81 9/11/2026
1.5.6 78 9/11/2026
1.5.5 78 9/11/2026
1.5.4 82 9/10/2026
1.5.3 75 9/10/2026
1.5.2 83 9/10/2026
1.5.1 82 9/10/2026
1.5.0 107 8/4/2026
1.4.3 105 7/30/2026
1.4.2 103 7/21/2026
1.4.1 101 7/21/2026

N/A