Skip to content
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

use resourceName instead of projectIds for listing entries #253

Merged
merged 1 commit into from
Nov 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use resourceName instead of projectIds
dwsupplee committed Nov 24, 2016
commit 7eff058bd7a3392e01bb855b2d29723a2c1f709b
2 changes: 1 addition & 1 deletion src/Logging/Logger.php
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ public function entries(array $options = [])
$logNameFilter = "logName = $this->formattedName";
$options += [
'pageToken' => null,
'projectIds' => [$this->projectId],
'resourceNames' => ["projects/$this->projectId"],
'filter' => isset($options['filter'])
? $options['filter'] .= " AND $logNameFilter"
: $logNameFilter
4 changes: 2 additions & 2 deletions tests/unit/Logging/LoggerTest.php
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ public function testGetsEntriesWithNoResults()
];
$this->connection->listEntries($options + [
'pageToken' => null,
'projectIds' => [$this->projectId],
'resourceNames' => ["projects/$this->projectId"],
'filter' => "logName = $this->formattedName"
])
->willReturn([])
@@ -122,7 +122,7 @@ public function testGetsEntriesWithAdditionalFilter()
$filter = 'textPayload = "hello world"';
$this->connection->listEntries([
'pageToken' => null,
'projectIds' => [$this->projectId],
'resourceNames' => ["projects/$this->projectId"],
'filter' => $filter . " AND logName = $this->formattedName"
])
->willReturn([])