Add logging options to PlaceholderExpansion #677
Merged
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.
Pull Request
Type
Description
Exposes some void methods within the PlaceholderExpansion class that allows expansions to log any messages to the console by simply calling
this.log(Level, String)or one of the convenience methods.I only focused on the bare minimum methods that have a String and didn't look for any that also accept throwables and alike. If requested would I implement those too.The goal of this PR is to add a way to simplify methods of logging things.
Right now will expansions, if they want to log stuff in some way need to either use
getPlaceholderAPI().getLogger()for each message to log, or create a local Logger instance to use instead.In addition, do these methods log the messages with a
[<expansion name>]prefix applied.Closes N/A