- 5 minutes to read

JSON formatted Log Event

Unlock robust, end-to-end integration logging with Nodinite by using JSON formatted Log Events. This guide provides technical details, field definitions, and best practices to help developers and integration experts create, validate, and leverage Log Events for maximum business value.

What you'll find on this page:

✅ JSON Log Event structure and required fields
✅ How to include payloads and context properties
✅ Examples for both minimal and full Log Events
✅ Best practices for asynchronous, decoupled logging
✅ Tips for self-service analytics and repository mapping

This article provides examples and technical guidance for creating JSON formatted Log Events in your custom logging solutions.

You can send JSON formatted Log Events directly to the LogAPI or to a queue/folder for asynchronous pickup by the Pickup Service (recommended approach).

A Log Event consists of three main parts:

  1. Event details (also called Additional field values in Nodinite)
    • Use the field function in the Formula plugin to extract values
  2. Payload (Body, 0 or more)
    • Use the body function in the Formula plugin to extract values from any payload
  3. Context properties (Key/Value)
    • Use the context function in the Formula plugin to extract values from the key/value collection
graph TD subgraph "Log Event" subgraph "1. Details" roED[fal:fa-bolt Event Details
LogDateTime = 2018-05-03 13:37:00+02:00
EndPointName = https://api.nodinite.com/...
MessageType=Invoice
...] end subgraph "2. Payload" ro[fal:fa-envelope Message
Body=base64EncodedMessage] end subgraph "3. Context Properties" roKey[fal:fa-key Key Values
InvoiceNo = 123
CorrelationId=456
...] end end

Illustration: JSON Log Event structure with details, payload, and context properties in Nodinite.

1. Details

The first 7 event fields are mandatory; the rest are optional (set value to null or omit the field). Providing more details improves the Nodinite end-user experience.

Mandatory Data Type Field Value Comment
number LogAgentValueId 42 Who (Log Agents) sent the data
string EndPointName "INT101: Receive Hello World Log Events" Name of Endpoint transport
string EndPointUri "C:\DropArea\in" URI for Endpoint transport
number EndPointDirection 0 Direction for Endpoint transport
number EndPointTypeId 60 Type of Endpoint transport
string OriginalMessageTypeName "https://nodinite.com/Customers/1.0#Batch" Message Type Name
string LogDateTime "2018-05-03T13:37:00.123Z" Client Log datetime (UTC format)
number EventDirection 17 External Incoming (before receive port)
string ProcessingUser "DOMAIN\user" Log Identity
number SequenceNo 0 Provide your own sequence number
number EventNumber 0 Provide your own event number
string LogText "File successfully generated" Your log text goes here
string ApplicationInterchangeId "" Id for Application scope
guid LocalInterchangeId null Id for local scope
string LogStatus 0 As defined for each Log Agent
string ProcessName "My customer process" Name of process
string ProcessingMachineName "localhost" Name of server where log event originated
string ProcessingModuleName "INT101-HelloHappyCustomers-Application" Name of module
string ProcessingModuleType "FilePickup" Type of module, exe, dll, service
guid ServiceInstanceActivityId null Id for run scope
number ProcessingTime 80 Flow execution time so far in milliseconds

LogDateTime – Provide timezone data (e.g. -01:00, +02:00, or Z). If not provided, UTC is used. Nodinite always stores LogDateTime as UTC and presents the correct time for end-users regardless of timezone.

Example: 2017-04-10T08:44:22.309+02:00 (+02:00 against UTC)

Value for the guid data type is sent without brackets or null.

Example: "064205E2-F7CF-43A6-B514-4B55536C2B67"

2. Payload

The payload is optional and can be a single message (default) or multiple payloads (e.g., email attachments).

Body

The payload/body is a base64 encoded string/file or null. Omit the "Body" field if you have no payload to log.

Mandatory Data Type Field Value Comment
string Body "SGVsbG8gV29ybGQ=" base64 encoded string

Bodies

If you have multiple payloads, use the Bodies element instead of the Body element.

Mandatory Data Type Field Value Comment
Array string Bodies ["SGVsbG8=", "V29ybGQ="] base64 encoded strings

3. Context Properties

Context properties are a collection of key/value pairs. Send whatever you need to create powerful self-service Log Views for your business.

Omit the "Context" field if you have no context properties to log.

...
"Context": {
    "CorrelationId": "064205E2-F7CF-43A6-B514-4B55536C2B67",
    "FileName": "\\server\\share\\NodiniteHappyCustomerList.txt"
}
Mandatory Data Type Field Value Comment
array Context { "Key1": "ABC", "Key2": "123"} Comma-separated list of key values of string data type

Repository

By providing additional details in the Context, the Repository Model may be populated with that information when processed by the Logging Service. Read more in the Context Options documentation.

Full Example

Complete Log Event with all available fields set (optional and mandatory):

{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z",
  "EventDirection": "17",
  "ProcessingUser": "DOMAIN\\user",
  "SequenceNo": 0,
  "EventNumber": 0,
  "LogText": "File OK",
  "ApplicationInterchangeId": "",
  "LocalInterchangeId": null,
  "LogStatus": 0,
  "ProcessName": "My Process",
  "ProcessingMachineName": "localhost",
  "ProcessingModuleName": "INT101-HelloWorld-Application",
  "ProcessingModuleType": "FilePickup",
  "ServiceInstanceActivityId": null,
  "ProcessingTime": 80,
  "Body": "SGVsbG8gV29ybGQ=",
  "Context": {
      "CorrelationId": "064205E2-F7CF-43A6-B514-4B55536C2B67",
      "FileName": "Hello.txt"
  }
}

Minimal Example

Minimal incoming Log Event with mandatory fields (endpoint is file-based in this example):

{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z"  
}

Next Step