---
title: LogStatusCodeAutoSyncPolicy System Parameter - Log Status Code Auto-Sync
description: "LogStatusCodeAutoSyncPolicy controls whether the Nodinite Logging Service creates or overwrites Log Status Code definitions from incoming events: Upsert, CreateMissingOnly, or Disabled, globally or per Message Type."
---

# LogStatusCodeAutoSyncPolicy - System Parameter

<sup><span class="nodinite-new-badge">New 7.5.24</span></sup>

The **LogStatusCodeAutoSyncPolicy** [System Parameter][System Parameters] controls how the [Logging Service][] creates and updates [Log Status Code][Log Status Codes] definitions from incoming events. Use it to protect manually curated definitions from being overwritten, globally or per [Message Type][Message Types].

![The Log Agent Contoso Shipping Platform - Test with Log Status Codes 200 Success and 500 Error (Carrier rejected the shipment), LogStatusCodeAutoSyncPolicy set to CreateMissingOnly and saved, the platform logging 409 as a Warning and 500 with LogLevel Information and new text, then the Log Agent's codes showing 409 added as Warning (Shipment already booked) and 500 still Error with its curated text, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: under `CreateMissingOnly`, a new Log Status Code (409) is added from an event, while the curated 500 keeps its type and description. Under `Upsert`, the 500 would have become Information with the event's text. The Logging Service was restarted off camera so the change applied at once.*

1. Open the [Log Agent][Log Agents]: it has the curated codes 200 Success and 500 Error, *Carrier rejected the shipment*.
2. Filter the [System Parameters][] list on *LogStatusCode* and open **LogStatusCodeAutoSyncPolicy**.
3. Set `default` to `CreateMissingOnly` and **Save**.
4. The platform logs 409 with LogLevel Warning, and 500 with LogLevel Information and its own text.
5. Open the Log Agent's Log Status Codes: 409 is added as a Warning, and 500 is still an Error with its curated text.

<h2 id="at-a-glance"><i class="fal fa-table" aria-hidden="true"></i> At a Glance</h2>

| Property | Value |
| --- | --- |
| Key | `LogStatusCodeAutoSyncPolicy` |
| Data type | json |
| Default | `{"default":"Upsert","messageTypes":{}}` |
| Read by | [Logging Service][] |
| Takes effect | Within about 5 minutes, for newly processed events (the Logging Service keeps the parsed policy 5 minutes); no restart needed |
| Status | ✅ Active |
| Since | <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 7.5.24 |

## <i class="fal fa-gears" aria-hidden="true"></i> How It Works

Auto-sync only concerns events whose context has the `ExtendedProperties/1.0#LogLevel` property (the status type), optionally with `ExtendedProperties/1.0#EventDescription` (the description); see [Context Options][]. For such an event, the Logging Service checks whether a definition exists for the originating [Log Agent][Log Agents] and Log Status. The policy decides what happens next (auto-sync, see [Automatic creation from incoming events][Log Status Code Auto Creation]):

| Mode | Behaviour |
| --- | --- |
| `Upsert` | Creates the definition if it doesn't exist, or overwrites its type and description if it does. This is the classic <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> behaviour and the default. |
| `CreateMissingOnly` | Creates the definition only if it doesn't exist; existing definitions are never overwritten. A suppressed overwrite is written as a Warning to the service log and the [Log Audit][Log Audits] (*Ignored LogStatusCode auto-sync for LogAgentId=…*). |
| `Disabled` | Never creates or updates definitions from incoming events. You manage all definitions manually in the [Web Client][]. |

## <i class="fal fa-code" aria-hidden="true"></i> Value Format

The value is a JSON object:

| Property | Type | Default | Meaning |
| --- | --- | --- | --- |
| `default` | string | `"Upsert"` | The policy for all Message Types without an override: `Upsert`, `CreateMissingOnly`, or `Disabled`. |
| `messageTypes` | object | `{}` | Optional map of Message Type name patterns to a policy mode, matched against the event's Original Message Type name. Keys are matched case-insensitively, and `*` matches any text anywhere in the pattern. The first matching pattern, in declaration order, wins; when none matches, `default` applies. |

### Protect All Definitions

```json
{
  "default": "CreateMissingOnly",
  "messageTypes": {}
}
```

*Example: create missing Log Status Codes, never overwrite existing ones. Use `"Disabled"` instead for full manual governance.*  

### Mixed Policies per Message Type

```json
{
  "default": "Upsert",
  "messageTypes": {
    "Vendor.ResilientEvent/*": "CreateMissingOnly",
    "Legacy.FixedCodes/*": "Disabled"
  }
}
```

*Example: events whose Message Type name starts with `Vendor.ResilientEvent/` never overwrite existing definitions, events matching `Legacy.FixedCodes/*` trigger no auto-sync, and everything else uses `Upsert`.*  

## <i class="fal fa-question" aria-hidden="true"></i> Frequently Asked Questions

### What happens when an event would have overwritten a code under CreateMissingOnly?

The existing definition is left unchanged, and a Warning is written to the service log and the [Log Audit][Log Audits], so you can audit suppressed overwrites without disrupting processing.

### Does the wildcard match partial names?

Yes. `*` matches any text, anywhere in the pattern: `Vendor.*/1.0` matches `Vendor.Order/1.0`. The key `Vendor.Order/*` matches `Vendor.Order/1.0` and `Vendor.Order/Dispatch`, but not `Vendor.OrderLine/1.0`. Matching is case-insensitive.

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

* <i class="fal fa-flag" aria-hidden="true"></i> [What is a Log Status Code?][Log Status Codes]  
* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Manage System Parameters][]  

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

* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging Service][]  
* <i class="fal fa-robot" aria-hidden="true"></i> [Log Agents][]  
* <i class="fal fa-file" aria-hidden="true"></i> [Message Types][]  
* <i class="fal fa-cog" aria-hidden="true"></i> [System Parameters][]  

[Context Options]:https://docs.nodinite.com/core-services/log-event/features/context-options/
[Hero]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/SystemParameters_LogStatusCodeAutoSyncPolicy.gif
[Log Agents]:https://docs.nodinite.com/administration/log-management/log-agents/overview/
[Log Audits]:https://docs.nodinite.com/administration/tools/log-audit-search/
[Log Status Code Auto Creation]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-status-code/#automatic-creation-from-incoming-events
[Log Status Codes]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-status-code/
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Manage System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/manage-system-parameters/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/
[Web Client]:https://docs.nodinite.com/core-services/web-client/overview/