πŸ“š Logs System

The Logs feature in nwMMOUpgrade allows you to automatically reset or clear log files generated by each station. This helps reduce disk usage and keeps log data manageable, especially for long-running servers.

logs:
  enable: false
  reset-logs:
    enable: false
    every: "12h30m"
    timezone: "Asia/Bangkok"

πŸ” How It Works

When reset-logs.enable is set to true, the system schedules a repeating task based on the interval defined in every.

⏱️ Supported Time Units

You can define time intervals using:

Unit
Meaning

s

seconds

m

minutes

h

hours

d

days

mo

months (30 days)

y

years (365 days)

Example:

🌍 Timezone Configuration

The timezone field uses IANA Time Zone Database identifiers. This ensures scheduled tasksβ€”like log resetsβ€”follow the correct local time.

πŸ”— Valid Timezone List

https://en.wikipedia.org/wiki/List_of_tz_database_time_zonesarrow-up-right

Example:


πŸ“ 1. Log Folder & File Creation

Logs are stored in separate files, one for each station. A log file is created automatically the first time a station is used.


πŸ“ Example Log File Structure

Each log entry contains the following information:

Field
Description

timestamp

The time when the log was recorded

player

Name of the player

item

The item involved

success

Whether the operation succeeded (true / false)

reason

Message or reason returned by the station

This ensures every upgrade, repair, combine, reroll, or other action is traceable for debugging or administrative review.


Last updated