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

Support entry labels #1668

Merged
merged 7 commits into from
Mar 28, 2016
Merged

Support entry labels #1668

merged 7 commits into from
Mar 28, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 28, 2016

Fetched entries expose labels set on the back-end.

When logging, labels can be passed in explicitly to the log_text, log_struct, or log_proto methods. If not passed, any default values configured on the logger instance will be used.

See: #1566.

@tseaver tseaver added the api: logging Issues related to the Cloud Logging API. label Mar 28, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 28, 2016
tseaver added 3 commits March 28, 2016 13:55
Labels can be passed in explicitly to the 'log_text', 'log_struct', or
'log_proto' methods.  If not passed, any default values configured on
the logger instance will be used.

See: #1566.

labels = self._get_labels(labels)
if labels is not None:
data['entries'][0]['labels'] = labels

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -78,7 +88,51 @@ def batch(self, client=None):
client = self._require_client(client)
return Batch(self, client)

def log_text(self, text, client=None):
def _make_entry_resource(self, text=None, info=None, message=None,

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Mar 28, 2016

LGTM. 7 commits seems like a lot?

@tseaver
Copy link
Contributor Author

tseaver commented Mar 28, 2016

7 commits seems like a lot?

Two of the commits are bugfixes for already-merged-to-logging-api code. :(

@dhermes
Copy link
Contributor

dhermes commented Mar 28, 2016

You can do with the commits as you see fit. You are go to merge on my end.

@tseaver tseaver merged commit f1b9261 into googleapis:logging-api Mar 28, 2016
@tseaver tseaver deleted the logging-support_entry_labels branch March 28, 2016 19:41
@tseaver
Copy link
Contributor Author

tseaver commented Mar 28, 2016

I merged as-is after aborting a rebase where I tried to clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants