-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove loglevel-debug
and DEBUG=apollo-gateway:*
support.
#3896
Merged
abernix
merged 6 commits into
release-2.12.0
from
abernix/remove-gateway-loglevel-debug
Mar 18, 2020
Merged
Remove loglevel-debug
and DEBUG=apollo-gateway:*
support.
#3896
abernix
merged 6 commits into
release-2.12.0
from
abernix/remove-gateway-loglevel-debug
Mar 18, 2020
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
While this package provided some simple functionality at one point or another, it was neither actively maintained, properly typed, and as of # fully-featured as of #3894, no longer really necessary. Also, since it re-uses the same logger based on repeat requests to `getLogger("name")` in a global context, it was responsible for recursively wrapping our log function in tests with the same `methodFactory` and causing our log messages to get longer and longer for each test which used `ApolloGateway`. This only affected tests, but was hard to track down the cause! The new `logger` functionality in the above PR should provide much more flexibility here and `debug: true` on the `ApolloGateway` constructor can replicate the same behavior. Anyone who misses this behavior can utilize the new pluggable logger to provide [`loglevel-debug`] themselves! [`loglevel-debug`]: https://npm.im/loglevel-debug
loglevel-debug
and DEBUG=apollo-gateway:*
support.loglevel-debug
and DEBUG=apollo-gateway:*
support.
This merely replicates the pattern and behavior here: https://github.com/apollographql/apollo-server/blob/fea6f15f/packages/apollo-server-core/src/ApolloServer.ts#L204-L209
This was only used for display purposes in a way that turned out to be to resolve a problem that `loglevel-debug` had necessitated by the way it provides its own `methodFactory` that prepends the date, etc.
loglevel-debug
and DEBUG=apollo-gateway:*
support.loglevel-debug
and DEBUG=apollo-gateway:*
support.
90cb1df
to
a9f1a1f
Compare
trevor-scheer
approved these changes
Mar 18, 2020
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.
YESSSSS 🥇
abernix
added a commit
that referenced
this pull request
Jun 29, 2020
Removed in the same spirit as was done in the `@apollo/gateway` package (see footer for PR reference) due to general deficiencies and bugs in that chosen implementation and also just because it's widely unutilized (if used at all). Much in the same way as the PR below suggests, this behavior could be opted into if necessary by providing a custom `logger` to the plugin options. While that option doesn't yet exist, a PR would be very much welcome (though it does require juggling some of the conditions around how the "dry-run" mode works and does its logging in a well-defined way. [Ref]: #3896.
abernix
added a commit
that referenced
this pull request
Jun 29, 2020
Removed in the same spirit as was done in the `@apollo/gateway` package (see footer for PR reference) due to general deficiencies and bugs in that chosen implementation and also just because it's widely unutilized (if used at all). Much in the same way as the PR below suggests, this behavior could be opted into if necessary by providing a custom `logger` to the plugin options. While that option doesn't yet exist, a PR would be very much welcome (though it does require juggling some of the conditions around how the "dry-run" mode works and does its logging in a well-defined way. [Ref]: #3896.
abernix
added a commit
that referenced
this pull request
Jun 29, 2020
BREAKING CHANGE: Drop the use of uncommonly used `loglevel-debug`. Removed in the same spirit as was done in the `@apollo/gateway` package (see footer for PR reference) due to general deficiencies and bugs in that chosen implementation and also just because it's widely unutilized (if used at all). Much in the same way as the PR below suggests, this behavior could be opted into if necessary by providing a custom `logger` to the plugin options. While that option doesn't yet exist, a PR would be very much welcome (though it does require juggling some of the conditions around how the "dry-run" mode works and does its logging in a well-defined way. [Ref]: #3896.
abernix
added a commit
that referenced
this pull request
Aug 7, 2020
BREAKING CHANGE: Drop the use of uncommonly used `loglevel-debug`. Removed in the same spirit as was done in the `@apollo/gateway` package (see footer for PR reference) due to general deficiencies and bugs in that chosen implementation and also just because it's widely unutilized (if used at all). Much in the same way as the PR below suggests, this behavior could be opted into if necessary by providing a custom `logger` to the plugin options. While that option doesn't yet exist, a PR would be very much welcome (though it does require juggling some of the conditions around how the "dry-run" mode works and does its logging in a well-defined way. [Ref]: #3896.
abernix
added a commit
to apollographql/federation
that referenced
this pull request
Sep 4, 2020
…graphql/apollo-server#3896) While this package provided some simple functionality at one point or another, it was neither actively maintained, properly typed, and as of # fully-featured as of apollographql/apollo-server#3894, no longer really necessary. Also, since it re-uses the same logger based on repeat requests to `getLogger("name")` in a global context, it was responsible for recursively wrapping our log function in tests with the same `methodFactory` and causing our log messages to get longer and longer for each test which used `ApolloGateway`. This only affected tests, but was hard to track down the cause! The new `logger` functionality in the above PR should provide much more flexibility here and `debug: true` on the `ApolloGateway` constructor can replicate the same behavior. Anyone who misses this behavior can utilize the new pluggable logger to provide [`loglevel-debug`] themselves! Apollo-Orig-Commit-AS: apollographql/apollo-server@0ca43f8
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.
While this package provided some simple functionality at one point or another, it was neither actively maintained, properly typed, and as of # fully-featured as of #3894, no longer really necessary. Also, since it re-uses the same logger based on repeat requests to
getLogger("name")
in a global context, it was responsible for recursively wrapping our log function in tests with the samemethodFactory
and causing our log messages to get longer and longer for each test which usedApolloGateway
. This only affected tests, but was hard to track down the cause!It also was responsible for prepending the log lines with dates and times which were often undesirable since a more fully functional logger (as in, most cloud-based loggers) would already have baked in such metadata, rather than needing it inlined in the message itself.
The new
logger
functionality in the above PR should provide much more flexibility here anddebug: true
on theApolloGateway
constructor can replicate the same behavior.Anyone who misses this behavior can utilize the new pluggable logger to provide
loglevel-debug
themselves.