-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabled Features should be logged #980
Conversation
@Abhishekk24 Note that the issue ur fixing was already assigned to another user, who also already created a solution at #899 . So you might have done "double work" here. Ideally, before starting on an issue, you should get yourself assigned to it first - and if its already assigned to someone, coordinate quickly 🙂 |
Sure will consider this for further work . Thank you.
…On Sun, 10 Dec, 2023, 14:27 Daniel Tischner, ***@***.***> wrote:
@Abhishekk24 <https://github.com/Abhishekk24> Note that the issue ur
fixing was already assigned to another user, who also already created a
solution at #899 <#899> .
So you might have done "double work" here. Ideally, before starting on an
issue, you should get yourself assigned to it first - and if its already
assigned to someone, coordinate quickly 🙂
—
Reply to this email directly, view it on GitHub
<#980 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5RZLCMIQ5IYRELDIE7FW3LYIV2P5AVCNFSM6AAAAABANZQ732VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHEYDAMBSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Please fix the issues mentioned by the failing checks, thanks. |
yes sure |
If there are anymore errors please guide me.. This is all new to me |
public static Collection<Feature> createFeatures(JDA jda, Database database, Config config, | ||
Logger logger) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y don't u just create a logger in this class
return features.stream().filter(f -> !blacklist.isEnabled(f.getClass())).peek(f -> { | ||
// Log INFO level message for each disabled feature using the provided logger | ||
String message = "Feature '" + f.getClass().getSimpleName() + "' is disabled."; | ||
logger.info(message); | ||
}).toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as u can see using peek is forbidden, so just put the log in filter method.
Also ur changing the logic before it removed the blacklisted features and kept all others, now it'll do the opposite
merged #1048 |
I added a feature to log a message when a certain function is turned off. This log message will help us know which features are disabled and understand why. It's like a notification that tells us, "Hey, we turned off this specific feature, and here's why." This can be useful for keeping track of the configuration and troubleshooting any issues related to disabled features.