Use Log4j, add console improvements and allow plugins to use SLF4 for logging #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a combination of moving Waterfall to Log4J (related to #139), additional console improvements using TerminalConsoleAppender (see PaperMC/Paper#728) and allowing plugins to use SLF4J (related to PaperMC/Paper#890).
It's similar to #139 but implemented differently. The only thing both PRs have in common is that Log4J2 is used (together with its async logging functionality). Otherwise they are different:
Handlerinstead of Log4J's custom JULLogManager. This is mostly because Log4J's customLogManagerprevents use of custom handlers attached to the JULLoggerand some plugins may make use of that. It's now similar to what Spigot does to forward them and I think it has shown to work quite well.System.outandSystem.errare redirected to the logger using Log4J IOStreamsThere are two additional commits that are equivalent to the changes in PaperMC/Paper#890. Plugin prefixes are handled using logger names in the Log4J configuration and plugins may now use SLF4J for logging.
As far I can tell, everything is already working correctly but I still need to do some cleanup...