- 4 minutes to read

LogStatusCodeAutoSyncPolicy - System Parameter

New 7.5.24

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

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)
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: 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.

At a Glance

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 Nodinite 7.5.24

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 and Log Status. The policy decides what happens next (auto-sync, see Automatic creation from incoming events):

Mode Behaviour
Upsert Creates the definition if it doesn't exist, or overwrites its type and description if it does. This is the classic Nodinite 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 (Ignored LogStatusCode auto-sync for LogAgentId=…).
Disabled Never creates or updates definitions from incoming events. You manage all definitions manually in the Web Client.

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

{
  "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

{
  "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.

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, 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.

Next Steps