Skip to content

Parse console log prefix on Bukkit servers - #190

Merged
pavog merged 1 commit into
masterfrom
bukkit-console-log-format
Nov 13, 2026
Merged

pavog merged 1 commit into
masterfrom
bukkit-console-log-format

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member

Bukkit servers write [16:24:27] [Server thread/INFO]: to logs/latest.log, but [16:24:27 INFO]: to the console.
Logs copied from the console were only parsed with the vanilla prefix, so no line matched and the whole log became a single entry starting at line 1, with the level of that first line.
Every problem in such a log pointed to that one entry.

This PR lets BukkitLog match both prefixes in $pattern and $prefixPattern.
It is on BukkitLog and not on VanillaLog, because the short console prefix comes from CraftBukkit and the servers based on it, not from vanilla.
The level is still the second group, so the parser matches don't change.

Detection is not changed.
These logs are only detected as Paper because the unparenthesized | in PaperLog::$logIdentifier lets This server is running Paper version match without any prefix.
That is left for its own PR.

The expected output of all Paper 26.3 logs except paper-circular-plugin-dependency-26-3.log changed: they are now split into separate entries with their own levels.
Their detected name, version, problems and information stay the same, only the entries the insights point to changed.

Changes

  • match the console prefix in BukkitLog::$pattern and BukkitLog::$prefixPattern
  • regenerate the expected output of 10 Paper 26.3 logs

@pavog
pavog requested a review from JulianVennen November 13, 2026 15:08
@pavog
pavog merged commit a5041fc into master Nov 13, 2026
3 checks passed
@pavog
pavog deleted the bukkit-console-log-format branch November 13, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants