@mctools/errors
v2.0.0
Published
Scan debug.log file to find unknown errors
Maintainers
Readme
Scan debug.log file to find unknown errors

In large modpacks, the debug.log file can contain hundreds of thousands of lines. This tool filters out unimportant and cluttered messages, leaving only the most critical ones.
Features:
- Log Trimming: Can cut the log file to a specific point (e.g., before the player joins the world).
- Message Sanitizing: Replaces parts of messages for better readability (removes timestamps, hash codes, UUIDs).
- Stack Trace Shortening: Truncates long stack traces.
- Error Grouping: Groups identical errors together.
- Advanced Filtering: Ignores a huge number of known harmless errors and warnings from many mods.
Ignore rules
ignore is a tree. Each item is a pattern, and nesting means every pattern on
the path must appear on the entry's first line in the order written — so a
level and a module name work as headings for everything below them. Each item
is its own map, so a heading may repeat as often as it reads well:
ignore:
- ERROR:
- FML:
- 'MultiModel minecraft:builtin.missing is empty'
- WARN:
- FML:
- Unable to find recipe for minecraft:rabbit_stew
- /(mixin|CleanMix)/:
- '@Final field * should be final'
- FML:
- 'Parsing error loading recipe 'A pattern is literal text in which * matches any run of characters within one
line. Wrap it in slashes to use a JS RegExp instead. Quote any pattern that
contains : , otherwise YAML splits it into two.
An ignore tree only ever grows, and a rule whose error was fixed years ago is
invisible dead weight. --unused (-u) writes to stderr every rule that
matched nothing in the scanned log — full path, plus the line it occupies in the
config, ready to delete — followed by a count. The error report on stdout and
the exit code are unaffected, so it is safe to add to an existing command:
> npx @mctools/errors -c dev/tools/mct-errors-config.yml --unused
dev/tools/mct-errors-config.yml:97 /(LaunchWrapper|Foundation)/ > Tweak class name * has already been visited
dev/tools/mct-errors-config.yml:105 Failed to load bookmarked ItemStack from json string, the item no longer exists
144 of 264 ignore rules never matchedOne log is one data point: a rule is only proof-of-dead if it stays unused across the logs you care about.
Usage
Open console, navigate to your Minecraft directory (one with the mods/ directory or options.txt file)
> cd C:/Instances/MyModpackRun:
> npx @mctools/errors --help
Options
Scan debug.log file to find unknown errors (@mctools/errors)
USAGE @mctools/errors [OPTIONS]
OPTIONS
-o, --output Path for output with errors. If not specified output into stdout.
-l, --log="logs/debug.log" debug.log file path (may need to be enabled by launcher)
-c, --config="packages\errors\src\config.yml" Path to .yml file with configsAuthor
- https://github.com/Krutoy242
Other tools
- @mctools/errors - Scan debug.log file to find unknown errors
- @mctools/format - Format .zs files by using ESLint for typescript
- @mctools/manifest -
manifest.jsongeneration tool - @mctools/modlist - Generate .md file with all mods listed
- @mctools/reducer - Partially disable minecraft mods
- @mctools/source - Locate, clone or decompile Minecraft mod source code
- @mctools/tcon - Tweaks Tinker Constructs' materials with csv tables
- @mctools/zsfind - Look up ZenScript class definitions, fields and method signatures from CraftTweaker dumps
