---
title: Quickly get started with a proper configuration for Serilog with Nodinite
description: Learn about the Settings section in your configuration file (appsettings.json) for enabling Nodinite Logging with Serilog sinks including ReplaceRules and Log Status Code options.
---

# Settings Section (appsettings.json)

You can read and learn about the **Settings** section of your **appsettings.json** file on this page.

``` json
...
    "Settings": {
        "LogAgentValueId": 503,
        "EndPointName": "Nodinite.Serilog.Sink.Tests",
        "EndPointUri": "Nodinite.Serilog.Sink.Tests.Serilog",
        "EndPointDirection": 0,
        "EndPointTypeId": 0,
        "OriginalMessageTypeName": "REPLACEDBYCODE",
        "ProcessingUser": "NODINITE",
        "ProcessName": "Nodinite.Serilog.Sink.Tests",
        "ProcessingMachineName": "NODINITE-DEV",
        "ProcessingModuleName": "DOTNETCORE.TESTS",
        "ProcessingModuleType": "DOTNETCORE.TESTPROJECT",
        "LogOnlyMessagesWithBody": "true",
        "ReplaceRules": {
            "Body": [ "InputMessage", "OutputMessage" ],
            "ApplicationInterchangeId": [ "EventID" ],
            "LogStatus": [ "StatusCode" ]
        }
...
```

<sup><span class="nodinite-new-badge">New 2.0.22</span></sup> **"LogOnlyMessagesWithBody"** is a new property that by default logs ALL events. If you set this to true, there must be a **Body** or at least one **Body** in the **Bodies** collection for a log to be written. This new behaviour may be applied to all <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Serilog sinks.

<sup><span class="nodinite-new-badge">New 2.0.35</span></sup> You can [Log Events][] with a [Log Status Code][Log Status Codes] adding a `new EventId(1337, "Elite")` to the [Serilog][Serilog Overview] logging.  

<sup><span class="nodinite-new-badge">New 2.0.35</span></sup> **ReplaceRules** can be used to map **Semantic Logging** to map data to the structure of a <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JSON Log Event][].

```csharp
_logger.LogInformation(new EventId(1337, "Elite"), "Hello {CustomContextValue}! {Input-Message} {Bodies} {QQQ} {OriginalMessageType} {EndPointName} {EndPointUri} {EndPointDirection} {EndPointTypeId} {EventDirection} {ProcessingTime} {EventNumber} {SequenceNo} {LocalInterchangeId} {ServiceInstanceActivityId} {KALLEKULA}",
    "Custom Context Value",
    "MyBody",
    "[\"MyBody1\",\"MyBody2\"]",
    "MyApplicationInterchangeId",
    "MyOriginalMessageType",
    "MyEndPointName",
    "MyEndPointUri",
    "1", // EndPointDirection
    "1", // EndPointTypeId
    "1", // EventDirection
    "1", // ProcessingTime
    "1", // EventNumber
    "1", // SequenceNo
    Guid.NewGuid(), // LocalInterchangeId
    Guid.NewGuid() // ServiceInstanceActivityId
);
```

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* [JSON Log Event][] — Review the full JSON Log Event structure to understand all available fields  
* [Context Options][] — Learn about additional context configuration options for the Serilog sink  
* [Serilog Overview][] — Overview of all available Nodinite Serilog sinks  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* [Log Status Codes][] — Reference for all Nodinite Log Status Codes  
* [Serilog Overview][] — Return to the main Serilog documentation page  

[Context Options]:https://docs.nodinite.com/core-services/log-event/features/context-options/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log Events]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Status Codes]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-status-code/
[Serilog Overview]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/