Skip to content
These docs reflect Contracts v0.6.0, the latest release. Older servers may differ.

Logging

Records contract events (accepted, completed, claimed, and more) to a log file. Logging is off by default: set a Mode, then enable the individual events you care about.

{
"Logging": {
"Mode": "None",
"Retention Days": 30,
"Contract Accepted": { "Enabled": false, "Format (Text Mode)": "..." }
}
}
SettingTypeDefaultDescription
ModeenumNoneNone disables all logging.
Text writes the human-readable Format (Text Mode) line for each enabled event.
JSONL writes one structured JSON object per event (the format strings are ignored). Use this mode when you want to use the web editor’s stats graphs.
Retention Daysint30How many days to keep log files. Older files are deleted automatically.

Each event below has its own Enabled flag and, for Text mode, a Format (Text Mode) string. The format is a template: the {tokens} in it are replaced with the event’s values when the line is written. In JSONL mode the tokens are emitted as fields instead, so the format string is not used.

Every event also accepts the five time tokens listed first in each table, in addition to the default format’s tokens.

Logged when a player accepts a contract. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) accepted contract {contract_name} ({contract_id}) in {category_name} ({category_id})
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.

Logged when a player finishes all of a contract’s objectives. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) completed contract {contract_name} ({contract_id}) in {category_name} ({category_id}) in {duration}s
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.
{duration} Seconds taken to complete, from acceptance to finish.

Logged when a player claims a completed contract’s reward. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) claimed contract {contract_name} ({contract_id}) in {category_name} ({category_id})
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.

Logged when a player abandons a contract they had accepted. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) abandoned contract {contract_name} ({contract_id}) in {category_name} ({category_id})
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.

Logged when an accepted contract expires because its category rotated before the player finished it. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) expired contract {contract_name} ({contract_id}) in {category_name} ({category_id}) after {duration}s
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.
{duration} Seconds the contract was active before expiring.

Logged when a reward is handed to a player. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) received {reward_type} reward: {reward_detail} from contract {contract_name} ({contract_id})
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{reward_type} The reward type: Item, Economics, Command, or ServerRewards.
{reward_detail} A human-readable description of the reward (e.g. item and quantity, or amount).
{reward_name} The reward's display title.
{reward_id} The reward's id.
{amount} The reward amount (item quantity, or currency/points; 1 when not applicable).
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.

Logged when a category rotates to a new set of contracts. Default Enabled: false.

[{timestamp_utc}] Category {category_name} ({category_id}) rotated. Contracts: {contract_ids}.
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{category_name} The category's name.
{category_id} The category's id.
{contract_ids} The ids of the contracts now in rotation, comma-separated.

Logged when a player finishes a single objective within a contract. Default Enabled: false.

[{timestamp_utc}] {player_name} ({player_id}) completed objective {objective_name} (#{objective_id}) in contract {contract_name} ({contract_id})
Token Meaning
{timestamp_utc} Event time in UTC (YYYY-MM-DD HH:MM:SS).
{timestamp_iso} Event time in UTC, ISO 8601.
{timestamp_local} Event time in the server's local timezone (YYYY-MM-DD HH:MM:SS).
{time_utc} Time of day in UTC (HH:MM:SS).
{time_local} Time of day in the server's local timezone (HH:MM:SS).
{player_name} The player's display name.
{player_id} The player's Steam ID.
{objective_name} The objective's title.
{objective_id} The objective's id (its key in the contract).
{objective_type} The objective's type (e.g. Kill, Gather, Loot).
{contract_name} The contract's title.
{contract_id} The contract's id (its key in the data file).
{category_name} The category's name.
{category_id} The category's id.