- 2 minutes to read
DaysToKeepMessageDataDefault - System Parameter
The DaysToKeepMessageDataDefault System Parameter sets the default Days to keep Bodies value that Nodinite copies onto every new Message Type. The Logging Service removes the message data (the message body, or payload) of a Log Event once it is older than the Message Type's own value, and keeps the event itself.
At a Glance
| Property | Value |
|---|---|
| Key | DaysToKeepMessageDataDefault |
| Data type | integer (days) |
| Default | 14 |
| Read by | Logging Service and Web API, when a Message Type is created |
| Takes effect | About 15 seconds, for Message Types created after the change; no restart needed |
| Status | ✅ Active |
| Since | Nodinite 2 |
How It Works
- A seed, not a live setting. Nodinite copies the value onto a Message Type only when the Message Type is created. Changing the parameter never changes existing Message Types; adjust those one at a time in Add or manage Message Type.
- The body belongs to the event. Each Message Type has three retention values: Events, Data, and Context. Deleting an event always deletes its body, so this value only matters when it is shorter than the events value set by DaysToKeepMessageEventsDefault. A Message Type's Days to keep Bodies cannot exceed its Days to keep Events. Context properties have their own value, DaysToKeepMessageContextDefault.
- Bodies are removed on each cleanup run of the Logging Service (see CleanUpTimerInterval). The full retention pipeline is described in the Logging Service Data Retention section.
Choosing a Value
- Message bodies are usually the largest part of what you log, so this value has the biggest effect on the size of the Log Database. The default is
14days. - Keep bodies for fewer days than events when you need a record that a transaction happened, but not the full message data for as long; this is a common data-minimisation choice.
- A value of
0makes new Message Types remove bodies on the next cleanup run. - Nodinite starts new Log Databases when one becomes too old (DaysToSplitDatabaseOn) or too large (SizeToSplitDatabaseOn), but the disk space for retained data is still yours to manage.
Frequently Asked Questions
I changed the value. Why are my existing Message Types unchanged?
Because the value only seeds Message Types at creation time. Open each existing Message Type in Add or manage Message Type and change its Days to keep Bodies there.