Skip to content
Documentation
Updated 4 minutes to read
Markdown
Release Notes

Nodinite Serilog sink using Nodinite Log API

Section titled “ Nodinite Serilog sink using Nodinite Log API”

Use the Nodinite Serilog sink for the Nodinite Log API with your full framework and .NET Core applications to enable end-to-end tracking. Typical examples include Microsoft Azure functions built with .NET (usually CSharp). Nodinite supports payload Logging and removes the obstacle that Application Insights logging imposes on message size.

graph LR A[.NET Application] --> | Log Event | SLS(Serilog) F[fal:fa-function Azure Function] --> | Log Event | SLS LA[fal:fa-cloud-arrow-down Nodinite Log API] SLS --> SLSB[fa:fa-list Api Sink] SLSB --> | Sync | LA

Choose one of the following articles based on the solution you want to enable Logging for:

❔'How To Start Logging With Microsoft.Extensions.Logging.ILogger in Azure Functions'
❔'How To Start Logging With Serilog'

Regardless of your choice, include the following configuration in your appsettings.json file:

New 7.10.9

The Log API sink posts each Log Event to the address in the NodiniteApiUrl setting exactly as you configure it (a trailing / is ignored). Set it to the Log Event address of your environment's Log API, in the Nodinite v7 format https://{host}:{port}/LogAPI/api/LogEvent. The host and port come from your environment's settings in the Nodinite Portal (Servers step).

Versions before 7.10.9 appended LogEvent/LogEvent to the configured NodiniteApiUrl. The Nodinite v7 Log API doesn't serve that route, so earlier versions of the sink don't work; the Log API answers with HTTP 404.

When you update Nodinite.Serilog.ApiSink to version 7.10.9 or later:

  1. Find every place you set NodiniteApiUrl: in code, and in the Args of your appsettings.json.
  2. Change the value to the complete Log Event address (see above).
  3. If your current value ends in /LogAPI/api/, add LogEvent to the end of it.
Current value 7.10.9 and later
https://fancysrv01:50002/LogAPI/api/ https://fancysrv01:50002/LogAPI/api/LogEvent

Configure NodiniteApiUrl in appsettings.json

Section titled “Configure NodiniteApiUrl in appsettings.json”
{
"Serilog": {
"Using": [ "Nodinite.Serilog.ApiSink" ],
"WriteTo": [
{
"Name": "NodiniteApiSink",
"Args": {
"NodiniteApiUrl": "https://fancysrv01:50002/LogAPI/api/LogEvent",
"Settings": {
...
}
}
}
]
}
}
var nodiniteSettings = new NodiniteLogEventSettings
{
LogAgentValueId = 503,
EndPointName = "Timers",
EndPointUri = "https://timers.contoso.com/",
EndPointDirection = 0,
EndPointTypeId = 0,
OriginalMessageTypeName = "Timers.LogEvent/1.0",
ProcessingUser = "TIMERS",
ProcessName = "Timers",
ProcessingMachineName = "BROWSER",
ProcessingModuleName = "Timers",
ProcessingModuleType = "BlazorWebAssembly"
};
var logger = new LoggerConfiguration()
.WriteTo.NodiniteApiSink("https://fancysrv01:50002/LogAPI/api/LogEvent", nodiniteSettings)
.CreateLogger();
builder.Services.AddSingleton<Serilog.ILogger>(logger);

Replace the host and port with the values of your environment's Log API.

New 7.10.9

When the Log API refuses a Log Event, for example because of a wrong NodiniteApiUrl, the sink reports the HTTP status and the Log API's response:

  • With WriteTo, Serilog writes the error to its SelfLog. Enable it during troubleshooting, for example with Serilog.Debugging.SelfLog.Enable(Console.Error);.
  • With AuditTo, your code receives the error.

❔'How To Start Logging With Microsoft.Extensions.Logging.ILogger in Azure Functions'
❔'How To Start Logging With Serilog'

Message Types - Critical for Search Field extraction from Log API sink events
Search Field Expressions - Extract business data from logged messages
Log Views - Search logged data by business identifiers
Non-Events Monitoring - Track message volumes and detect missing messages
Business Process Modeling (BPM) - End-to-end transaction tracking
Reduce Azure Functions Logging Costs - Lower the Azure cost of logging Azure Functions
Azure Costs for Blob Storage and Event Hub - What staging log events in Azure costs
Reduce Azure Logic Apps Run History Retention to Lower TCO - The same approach for Logic Apps
Reduce Azure API Management Logging Costs - The same approach for API Management

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...