Log Utils 0.4 - Migrate from static to instance loggers #15
+222
−184
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 PR migrates Log Utils from the static
Logclass to the traditionalLoggerinstance loggers. Here's my plan for this:Log, since everything is going to be instance-based now. There's no real way I can preserve it without basically duplicating the entire project.Loggerwill define the contract for consumers using loggers.AbstractLoggerdefines the simplest implementation of a basic logger, only having methodlog(Logger.Level, String)to override and the base implementation handles the rest.INFO) or indentation level.This one was based on a suggestion from @LexManos. My original intention behind the single static
Logwas for simplicity and performance, but since every god damn logging framework is instance-based (including Java's), there's no real point if we need to have instance loggers anyway.The only thing I haven't done yet are log tags, like prefixing messages with
[Mavenizer]or something. I don't think it would play nice with the indentation system, so we'd likely have to choose between either that or the indentations.