logger.list_entries optimization using equals and docs update #1848
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.
Two changes here:
logger.list_entries() was using just the logger name rather than the fully qualified name, you can see an example on the docs that from v1 to v2 the change from log to logName also changed to expect fully qualified name.
The query was also using the colon operator, which is a "has" operator. Problem 1 is that this is a slower query because it's not indexed, problem 2 is that I'm pretty sure there's a bug because it's not working.
Second set of changes is the docs, just some random small discrepancies between them and the actual API. The biggest discrepancy was in the Sink constructor, the samples all use keyword arguments and special names for different sink types, the actual code seems to take these all as general positional arguments.