- 6 minutes to read

JSON formatted Log Event

This page lists every field of a JSON formatted Log Event: the details, the payload (Body or Bodies), and the Context collection. For what the three parts are and what Nodinite does with them, see Log Event. To send the JSON, post it to the Log API (Log using REST) or write it to a queue, folder, or table for the Pickup Log Events Service Logging Agent (Asynchronous Logging, recommended).

To extract values from a Log Event into a Search Field, use the Formula functions body, context, and field.

Reference

Details

The first seven fields are mandatory. All other fields are optional: set them to null or omit them. The more details you provide, the better the experience for Nodinite users.

Nodinite Log Agents that create Log Events, such as the BizTalk and Logic Apps agents, set most of these fields for you, and logging frameworks such as Serilog let you control what is logged. A custom logging solution sets them itself.

number fields also accept the number as a string, for example "17" or "-1337".

Field Required Type Example Meaning
LogAgentValueId ✅ Yes number 42 Who sent the data: the Log Agent
EndPointName ✅ Yes string "INT101: Receive Hello World Log Events" Name of the Endpoint transport
EndPointUri ✅ Yes string "C:\\DropArea\\in" URI of the Endpoint transport
EndPointDirection ✅ Yes number 0 Direction of the Endpoint transport; see Endpoint Directions. If you leave it out, Nodinite 7 stores 0 (Receive).
EndPointTypeId ✅ Yes number 60 Type of the Endpoint transport; see Endpoint Types
OriginalMessageTypeName ✅ Yes string "https://nodinite.com/Customers/1.0#Batch" Name of the Message Type. It decides which Search Field Expressions run on the event (see the processing pipeline).
LogDateTime ✅ Yes string "2018-05-03T13:37:00.123Z" When the event happened at the client, with a time zone; see the note below the table
EventDirection No number 17 Where in the process the event happened, e.g. 17 External Incoming (before the receive port); see Event Directions
ProcessingUser No string "DOMAIN\\user" Identity that logged the event
SequenceNo No number 0 Your own sequence number; reset it on each logical interchange
EventNumber No number 0 Your own event number; in batched operations, unique for each event in the batch
LogText No string "File successfully generated" Your log text
ApplicationInterchangeId No string "" Id for the application scope
LocalInterchangeId No guid null Id for the local scope
LogStatus No number 0 Status code, as defined for each Log Agent; see Log Status Codes
ProcessName No string "My customer process" Name of the process
ProcessingMachineName No string "localhost" Name of the server where the Log Event originated
ProcessingModuleName No string "INT101-HelloHappyCustomers-Application" Name of the module
ProcessingModuleType No string "FilePickup" Type of the module, such as exe, dll, or service
ServiceInstanceActivityId No guid null Id for the run scope
ProcessingTime No number 80 Flow execution time so far, in milliseconds

Nodinite also calls the details fields Additional field values.

LogDateTime and Time Zones

Include the time zone in LogDateTime: Z for UTC, or an offset such as +02:00 or -01:00, e.g. "2017-04-10T08:44:22.309+02:00" (+02:00 against UTC). Without a time zone, Nodinite assumes UTC. Nodinite always stores LogDateTime as UTC and shows each user the correct local time.

GUID Values

Send a guid without braces, e.g. "064205E2-F7CF-43A6-B514-4B55536C2B67", or null.

Payload

The payload is optional. It is a single message (the default, Body) or several messages, such as email attachments (Bodies). Each body is a base64 encoded string or file. Omit the field when you have no payload to log. Character Encoding explains how Nodinite decodes the text of a body.

Field Required Type Example Meaning
Body No string "SGVsbG8gV29ybGQ=" One base64 encoded payload, or null
Bodies No array of string ["SGVsbG8=", "V29ybGQ="] Several base64 encoded payloads; use Bodies instead of Body

Context

The context is a collection of key/value pairs with string values. Send whatever you need to build self-service Log Views for your Users: Search Field Expressions can extract values from the context too. Omit the field when you have no context properties to log.

Field Required Type Example Meaning
Context No object {"Key1": "ABC", "Key2": "123"} Key/value pairs; every value is a string

Fragment of a Log Event, showing only the Context field:

{
  "Context": {
    "CorrelationId": "064205E2-F7CF-43A6-B514-4B55536C2B67",
    "FileName": "\\\\server\\share\\NodiniteHappyCustomerList.txt"
  }
}

Keys that start with ExtendedProperties/1.0# are Context Options: they change how the Logging Service processes the event, such as overriding the Message Type or the encoding. With Repository Binding, the context also populates the Repository Model while the event is processed; this works only when the AllowRepositoryAutomapping System Parameter is set to true.

Examples

Minimal Example

An incoming Log Event with only the mandatory fields (the 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"
}

Full Example

A Log Event with every field set, mandatory and optional:

{
  "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"
  }
}

Multiple Bodies Example

The minimal Log Event with two payloads in Bodies instead of Body:

{
  "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",
  "Bodies": ["SGVsbG8=", "V29ybGQ="]
}

Next Steps