Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

Redo Terra Logging Framework

solonovamax opened this issue ยท 1 comments

commented

Feature Description

Sort of expands on #149
Add a logging framework to Terra.

What Problem Does This Solve?

Currently, the Terra logging system lacks quite a few features. Those being:

  • Parametrized logging
  • Logging Markers
  • Separate logging facade and binding
  • Exception logging with messages
    • Having actually good messages paired with the exceptions.
      • Also (possibly) modifying the output of the stack trace to remove classes that are useless to the user. (eg. when an exception occurs in a terrascript class, it would trim out all the terrascript stuff and replace it with a single statement. Or, pack exceptions would have much of the (otherwise useless) lines removed.) More lines makes it more confusing for people. (Although, it might be good to also save the stack trace somewhere on disk)
  • Colored logging
  • (Possibly) I18N
  • MDC

A Solution You'd Like

The best solution (so far) seems to be switching to SLF4J and then implementing custom bindings per-platform based on logback.
This would offer the following advantages:

Alternative Solutions

Leave the logging system as it is. Easier, but has disadvantages.

commented

Also, (very stupid idea), what if we were to bundle yarn mappings inside the forge and spigot jars, then it remaps all the obfuscated garbage mojang classes in the exceptions?
It might make things more berable to read. (Alternatively, this should probably be done as a "what-the-fuck-does-this-stacktrace-mean" addon.