- 3 minutes to read

Custom Logging (DIY)

If the System Integration Platform in use does not have a built-in tracking feature, and there is no other suitable Nodinite Logging Agent to use, you may need to perform Custom Logging. This article aims to help you understand the prerequisites and also provides some tips and tricks.

graph LR subgraph "Systems Integrations Solutions" roStrategy(fal:fa-lightbulb-on Logging Strategy) --> roBroker{fal:fa-brackets-curly Reusable
Generic Logging logic} roBroker --> |Nodinite JSON Log Event|roSink(fal:fa-file-export Intermediate storage ) roBroker -.-> |"The other format(s)"| ro2["Other Log destination(s)"] end subgraph "Nodinite instance" roPS(fal:fa-truck-pickup Pickup Service) -->roNI(fal:fa-cloud-download Log API) roSink --> roPS end

Customers and Partners have used a Custom Logging strategy to log business transactions to Nodinite from the following:

  • Apache Camel
  • IBM Sterling
  • iCore
  • Frends
  • Ghostnodes
  • MoveIT
  • TEIS (TietoEvry)
  • webMethods (Software AG)

Design Goals

When built-in tracking does not exist in your message broker/solution using any of the Nodinite Logging Agents; your mission is to produce a JSON formatted Log Event and place it on a highly available target (e.g. a queue, a file share, a database, ...).

When available, the Nodinite Pickup Log Events Service Logging Agent fetches your Nodinite Log Events asynchronously which means you will get less code, reliable logging and avoid overloading Nodinite in your custom-built solutions.

graph LR subgraph "Custom Logging" roLogSink("fal:fa-bolt Custom Logging Solution
.NET/.NET Core
Mule ESB
Java/NodeJS/
webMethods/...") --> roId1["fal:fa-list Queue
fal:fa-folder Folder
..."] end subgraph "Web Server" roLogAPI(fal:fa-cloud-download Log API) roPS(fal:fa-truck-pickup Pickup Service)--> roLogAPI roId1 -."1. Async Log Event".-x roPS roLogSink --> |"2. Synchronous Log Event"|roLogAPI end
  1. Async Log Event - Asynchronous
  2. Synchronous Log Event (NOT recommended)

Custom Logging Checklist

Use the following bullets in your Logging strategy:

  • Make sure the Custom Logging is Asynchronous.
  • Use an appender based strategy to avoid vendor lock-in.
  • Log4Net
  • Serilog
  • WCF
  • Log4J
  • Make sure to provide the necessary data
  • Properties (key/value)
  • Message Body/Bodies (XML, JSON, Flatfile, CSV, EDIFACT, X12, ...)
  • When writing custom code, make sure it is NOT Nodinite-specific. Make sure to add a layer of abstraction. This avoids a vendor lock-in.
  • Reuse a shared custom Logging component to aid Logging to multiple destinations (replaceable)

Steps

Use the following steps to produce your own Custom Logging to Nodinite.

Step 1: Programming Language

Depending on which programming you will use, there is either a way to build a Logging solution using a battle proven NuGet package or you may need to handcraft a solution according to the specifications on this page.

Logging Templates

Step 2: Create the JSON Log Event

Your code must create a JSON object. The structure is well documented here.

Step 3: Write to Intermediate Storage

You must now write the JSON formatted Log Event to an Intermediate Storage. The Nodinite Pickup Service fetches Log Events from many intermediate storages. Consume the Log Events from any of these that fit your purpose.

Step 4: Install Nodinite Pickup Service

Next, if you have not already installed the Nodinite Pickup Service, then, now is the time.

Step 5: Configure Nodinite Pickup Service

Next, you must Configure the Nodinite Pickup Service.

Step 6: Monitor the Intermediate Storage

Choose an appropriate Nodinite Monitoring Agent according to the Intermediate Storage in use and make sure the Logging is operational. You need to know if you are stockpiling your JSON formatted Log Events in either the target or a backout destination. The latter is helpful if your Log Events are rejected by the system (a possible cause is a malformed or invalid Log Event).

Use the table in Step 3 for additional information.

Step 7: Create Log Views

Now that you have business transactions in Nodinite, you can create one or more self-service enabled Log Views.