Skip to content

Commit

Permalink
Merge pull request #73 from aternosorg/inline-crash-reports
Browse files Browse the repository at this point in the history
Detect various crash reports even if there's another character before it in the first line
  • Loading branch information
matthi4s authored Jun 14, 2024
2 parents 3d6e327 + c0684e1 commit a489238
Show file tree
Hide file tree
Showing 11 changed files with 4,621 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class FoliaCrashReport extends FoliaLog implements CrashReportLogTypeInterface
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Folia version git-Folia/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Folia version git-Folia/m")];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class PaperCrashReportLog extends PaperLog implements CrashReportLogTypeInterfac
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Paper version git-Paper/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Paper version git-Paper/m")];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class PurpurCrashReportLog extends PurpurLog implements CrashReportLogTypeInterf
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Purpur version git-Purpur/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\s+Running: Purpur version git-Purpur/m")];
}
}
4 changes: 2 additions & 2 deletions src/Log/Minecraft/Vanilla/Fabric/FabricCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class FabricCrashReportLog extends FabricLog implements CrashReportLogTypeInterf
public static function getDetectors(): array
{
return [
(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: fabric/im"),
(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'fabric'/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: fabric/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'fabric'/im"),
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class ArclightCrashReportLog extends ArclightLog implements CrashReportLogTypeIn
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\tKnown server brands:( [a-zA-Z])* arclight/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tKnown server brands:( [a-zA-Z])* arclight/m")];
}
}
2 changes: 1 addition & 1 deletion src/Log/Minecraft/Vanilla/Forge/ForgeCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ForgeCrashReportLog extends ForgeLog implements CrashReportLogTypeInterfac
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\tFML:/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tFML:/m")];
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NeoForgeCrashReportLog extends NeoForgeLog implements CrashReportLogTypeIn
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\tNeoForge:/m")];
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tNeoForge:/m")];
}


Expand Down
4 changes: 2 additions & 2 deletions src/Log/Minecraft/Vanilla/Quilt/QuiltCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class QuiltCrashReportLog extends QuiltLog implements CrashReportLogTypeInterfac
public static function getDetectors(): array
{
return [
(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: quilt/im"),
(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'quilt'/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: quilt/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'quilt'/im"),
];
}

Expand Down
Loading

0 comments on commit a489238

Please sign in to comment.