Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/Log/Minecraft/Vanilla/Bukkit/BukkitLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@

abstract class BukkitLog extends VanillaLog
{
/**
* Bukkit servers write the vanilla prefix to logs/latest.log, but a shorter one to the console,
* and logs copied from the console are uploaded as well.
*
* Matches both prefixes:
* [16:24:27] [Server thread/INFO]: Loading properties
* [16:24:27 INFO]: Loading properties
*/
protected static string $pattern = '/^(\[(?:[0-9]{2}:?){3}(?:\] \[[^\/]+\/| )(\w+)\]:).*$/';

/**
* Same prefixes as $pattern, including the space after the colon:
* "[16:24:27] [Server thread/INFO]: " and "[16:24:27 INFO]: "
*/
protected static string $prefixPattern = '\[(?:[0-9]{2}:?){3}(?:\] \[[^\/]+\/| )\w+\]: ';

/**
* @return AnalyserInterface
*/
Expand Down
Loading
Loading