This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
This file contains 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
silasary
reviewed
Jul 1, 2022
On-Hold pending discussion and conflict resolution |
LordOfPolls
added
the
On-Hold
This is waiting for a condition to be met before more work can be done
label
Jul 3, 2022
Kigstn
removed
the
On-Hold
This is waiting for a condition to be met before more work can be done
label
Jul 4, 2022
Ready for review |
LordOfPolls
approved these changes
Jul 4, 2022
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.
It hurts me calling it logger
Final conflict resolution
/ok-to-test |
It hurts me calling it |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What type of pull request is this?
Description
This is an alternative solution to #547, attempting to solve the logging problem.
This PR allows users to pass their own logger at client initialisation. The passed logger is saved in both the client and naff.constants.
This has several benefits;
rich.logging
or file handlers can be easily usedclient.logger
andnaff.consts.logger
, instead of having tologging.getLogger(logger_name)
every time they want to use itChanges
naff.consts
which is overwritten by the logger the user passes toClient
Checklist
Python 3.10.x