Skip to content

Logging

Jan Kluka edited this page Jul 27, 2026 · 2 revisions

Logging

X-Prison keeps its own log file in plugins/X-Prison/logs/, separate from the server-wide logs/latest.log. Everything X-Prison and its add-ons print goes there as well as to the console — timestamped, with colour codes removed, and with full stack traces preserved.

The point is support: instead of asking you to find X-Prison's lines in a log shared with every other plugin on the server, a bug report becomes "attach errors.log", or simply /xprison logs dump.


Overview

Location plugins/X-Prison/logs/
Config logging.yml
Console output Unchanged — this is in addition to it
Performance Written off the server thread; never blocks the game
Can be switched off Yes — enabled: false

The files

File What it holds
latest.log Everything X-Prison logged during the current session
errors.log Warnings and errors only — this is the file to attach to a bug report
2026-07-27-1.log.gz A rolled archive of a previous latest.log
errors-2026-07-27-1.log.gz A rolled archive of a previous errors.log
xprison-support-*.zip A support bundle produced by /xprison logs dump

A new latest.log is started every time the server starts, so the live file always describes the current run.


What a line looks like

[2026-07-27 16:52:53.441] [INFO ] [Server thread       ] [Core           ] Detected server platform: PAPER
[2026-07-27 16:52:58.402] [ERROR] [Server thread       ] [Core           ] Enchant class not found: DeclarativeEnchant
java.lang.ClassNotFoundException: dev.drawethree.xprison.enchants.declarative.DeclarativeEnchant
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:208)
	...
[2026-07-27 16:56:21.895] [INFO ] [Server thread       ] [Addon:AnimatedEnchants2] Animated Enchants 2 enabled — registered 4/4 enchants.

Each line carries the time, the level, the thread it came from, and its source. The source is Core for X-Prison itself and Addon:<Name> for an add-on — add-on output lands in the same file, so when a customer reports "enchants are broken" you can see the core and the add-on side by side.

Stack traces are written in full, Caused by: chains included. They are never truncated.


The session header

Every file opens with a summary of the server it came from:

════════════════════════════════════════════════════════════════
  X-Prison session start
════════════════════════════════════════════════════════════════
 X-Prison      : 2026.3.1.6
 Server        : 26.1.2-63-711c5de (MC: 26.1.2)  (api 26.1.2.build.63-stable)
 Platform      : PAPER  folia=false
 Java          : 25.0.2 (Oracle Corporation) on Windows 11 amd64
 Started       : 2026-07-27 16:52:57
════════════════════════════════════════════════════════════════

A second block is written once startup finishes, adding the text renderer, database type, debug flags, how many modules are enabled (and which were skipped) and how many add-ons loaded. Turn it off with session-header: false.


Rotation and cleanup

A new file is started when the current one passes rotation.max-size-mb (25 MB by default) or when the date changes. Rolled files are compressed to .gz, which typically shrinks them about tenfold; read them with zgrep, 7-Zip, or any archive tool.

Old archives are removed automatically — anything past retention.max-age-days (14), and, if the folder still exceeds retention.max-total-size-mb (500), the oldest archives until it fits. latest.log and errors.log are never deleted.

Note on privacy: logs contain player names and UUIDs, so retention.max-age-days doubles as how long that information is kept on disk.


Commands

Command Description
/xprison logs Where the log is, how large it is, how many lines this session
/xprison logs dump Package the logs into a zip, ready to attach to a bug report

/xprison logs dump collects latest.log, errors.log, the five most recent archives and a copy of your config.yml with the database host, username and password removed. Database credentials are also masked in the log files themselves, because JDBC drivers routinely put the connection string into their exception messages.

/xprison health-check reports whether file logging is active and how large the file is.


Debug output

logging.yml controls what is written to disk. What X-Prison reports in the first place is still controlled by debug-mode in config.yml.

X-Prison prints its debug output at INFO level, so once debug-mode: true is set, that output goes to the file as well. If you want to leave debug on for a while without filling the log, set file.level: WARN — the console keeps showing everything, the file keeps only problems.


Performance

Log lines are queued in memory and written by a background task, so no file access ever happens on the server thread. If logging outruns the disk — which realistically only happens with debug-mode: true on a very busy server — the newest lines are dropped and the file records how many were lost, rather than making the server wait for the disk.

If writing fails repeatedly (a full disk, a disconnected network share), X-Prison stops writing for the rest of the session, prints one warning, and carries on running normally.


Related

  • logging.yml — full config reference
  • History — the player-facing audit trail, which is a different thing: it records what players did, in the database, and is browsable in-game. Logging records what the plugin did, on disk, for diagnosis.

XPrison Logo

General

Modules

Default Configs

Enchant Configs — Passive

Enchant Configs — Currency Rewards

Enchant Configs — Key & Item Rewards

Enchant Configs — Area of Effect

Enchant Configs — Multipliers

Enchant Configs — Templates

Enchant Configs — Addons

Addons

Support

For Developers

Others

Clone this wiki locally