---
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" ]
        }
...
```

:new2.0.22: **"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 :Nodinite: Serilog sinks.

:new2.0.35: You can [Log Events][] with a [Log Status Code][Log Status Codes] adding a `new EventId(1337, "Elite")` to the [Serilog][Serilog Overview] logging.  

:new2.0.35: **ReplaceRules** can be used to map **Semantic Logging** to map data to the structure of a :Nodinite: [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
);
```

## :fa-hand-point-right: 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  

## :fa-link-horizontal: Related Topics

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

[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[JSON Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[Log Events]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Status Codes]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Status%20Code.md
[Serilog Overview]:{ndr}/Logging%20and%20Monitoring/Serilog/Overview.md