Open gabizou opened 7 years ago
Having a border is kind of redundant if this is just going to go into its own file anyway.
Having a border is kind of redundant if this is just going to go into its own file anyway.
Side note as per discussion with @kashike: Note Number 2: There will be a presentational difference to how the reports are presented in the console log versus how they will be presented in the report file itself, namely the borders will be removed when a report is printed to file.
Literally read the description.
Currently, it's a well known fact that the CauseTracker does provide a lot of information with regards to providing exceptions and debugging information for Sponge developers to be able to fix bugs in the implementation. Be it that those bugs are directly our fault, or bugs that are interactions with other mods at play. The issue however, is that there is no way to expose this for plugins to provide a more suitable object use for plugins to provide more useful information, unless they spend the time themselves to make their own error reporting framework.
Internally, Sponge uses the PrettyPrinter from Mixins, but this isn't suitable for the API. Since it is something that is strictly for logging purposes, making the logs provide more formatted information in sections or indented objects requires some manual work.
That being said, what I'd like to be able to provide is an API that can be used both in implementation and from plugins to turn error reports from the following:
Into:
That being said, I'll be opening a PR with this very description soon after some feedback is given by the community and developers.
Overall however, this would ideally be able to be PRINTED to file so that the reports can simply be copy pasted into a GitHub issue description without having to scroll through potentially hundreds if not thousands of lines of server logs.
Side note as per discussion with @kashike: Note Number 2: There will be a presentational difference to how the reports are presented in the console log versus how they will be presented in the report file itself, namely the borders will be removed when a report is printed to file.