Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect various crash reports even if there's another character before it in the first line #73

Merged
merged 1 commit into from
Jun 14, 2024
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
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
Loading