Add logging options to PlaceholderExpansion#677
Merged
PiggyPiglet merged 4 commits intomasterfrom Dec 3, 2021
Merged
Conversation
* Add contributing and expansion section * Start using new Issue template system * Create bug_report.yml * Rename feature_request.md to feature_request_old.md * Create feature_request.yml * fix unique name * Update feature_request_old.md * Add Checkboxes * Add checkboxes * disable default issue body * Delete bug_report_old.md * Delete feature_request_old.md * Rename bug_report_new.yml to bug_report.yml * Check if deleting this fixed the PR... * Use description in favour of about * improve feature_request.md * Update bug_report.yml * Assign "Type: Issue (Unconfirmed)" label * Use lists and not comma-separated string * Update feature_request.yml * Use id option for error and dump fields * Add field for logs * Remove deprecated issue_body type * Update feature_request.yml * Improve description of bug_report.yml * Initial 1.17 Changes * add render * Revert build.gradle dependencies change * Fixed duplicate files * Initial test on adventure * started moving to pure adventure * finished kyori impl * added 1.17 to nmsversion (what does this even do) * removed dev for release * added dev back Co-authored-by: PiggyPiglet <PiggyPiglet@users.noreply.github.com> Co-authored-by: darbyjack <admin@glaremasters.me> Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
Starmism
approved these changes
Jul 23, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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