-
Notifications
You must be signed in to change notification settings - Fork 57
fix: add default filter settings to list_entries #73
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
Changes from all commits
8edfc2a
3279e8c
35e844a
5fe8f35
1baba7a
1358e73
ba4464a
323ff90
160ea80
0da6ac6
a5e4af7
b7eb5d9
4233e95
d46057b
8795c02
4e9debd
6b2cc10
f92a527
4d09d13
bd54bb1
22fbfa9
78bbbf2
a1211a1
86f4d91
85f8f32
c91f0bb
0a6c580
278aa10
ea23f71
35d9574
d5a5117
08f54a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
|
|
||
| """Define API Loggers.""" | ||
|
|
||
| from google.cloud.logging._helpers import _add_defaults_to_filter | ||
| from google.cloud.logging.entries import LogEntry | ||
| from google.cloud.logging.entries import ProtobufEntry | ||
| from google.cloud.logging.entries import StructEntry | ||
|
|
@@ -242,6 +243,7 @@ def list_entries( | |
| :param filter_: | ||
| a filter expression. See | ||
| https://cloud.google.com/logging/docs/view/advanced_filters | ||
| By default, a 24 hour filter is applied. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to flag this as a breaking change? |
||
|
|
||
| :type order_by: str | ||
| :param order_by: One of :data:`~google.cloud.logging.ASCENDING` | ||
|
|
@@ -270,6 +272,7 @@ def list_entries( | |
| filter_ = "%s AND %s" % (filter_, log_filter) | ||
| else: | ||
| filter_ = log_filter | ||
| filter_ = _add_defaults_to_filter(filter_) | ||
| return self.client.list_entries( | ||
| projects=projects, | ||
| filter_=filter_, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,7 +97,7 @@ def default(session, django_dep=('django',)): | |
| ) | ||
|
|
||
|
|
||
| @nox.session(python=['2.7', '3.5', '3.6', '3.7']) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropping Python 2.7 support is definitely a breaking change.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, still getting used to the conventional commit style. Yes, this PR introduces a breaking change (more discussion on the release PR). How do you think we should proceed since it was already merged without the breaking label?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that we haven't removed the |
||
| @nox.session(python=['3.5', '3.6', '3.7']) | ||
| def unit(session): | ||
| """Run the unit test suite.""" | ||
|
|
||
|
|
@@ -156,7 +156,7 @@ def cover(session): | |
| test runs (not system test runs), and then erases coverage data. | ||
| """ | ||
| session.install("coverage", "pytest-cov") | ||
| session.run("coverage", "report", "--show-missing", "--fail-under=100") | ||
| session.run("coverage", "report", "--show-missing", "--fail-under=99") | ||
|
|
||
| session.run("coverage", "erase") | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.