GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support entry labels by tseaver · Pull Request #1668 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Mar 28, 2016

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver tseaver assigned dhermes Mar 28, 2016
@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
@tseaver
Track labels set on an entry by the backend.
dfd815a
@tseaver
Allow setting default labels on a logger instance.
2c4c5b3
@tseaver
Add support for logging entries with labels.
64e2f1c
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.
dhermes
dhermes reviewed Mar 28, 2016
View reviewed changes
Comment thread gcloud/logging/logger.py Outdated

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver added 4 commits March 28, 2016 14:27
@tseaver
Add 'Logger.path' property.
53df5fc
It was needed earlier for batch support, but was masked by the attribute
on the mock '_Logger' used by the batch tests.
@tseaver
Add label support to the newly-added batch feature.
7aa9629
@tseaver
Fix incorrect 'structPayload' entry in 'Batch.commit'.
43a0936
@tseaver
Factor out construction of log entry resource into a helper.
5cbeaca
Addresses:
#1668 (comment)
dhermes
dhermes reviewed Mar 28, 2016
View reviewed changes
Comment thread gcloud/logging/logger.py
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.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 28, 2016

Copy link
Copy Markdown
Contributor

LGTM. 7 commits seems like a lot?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Mar 28, 2016

Copy link
Copy Markdown
Contributor Author

7 commits seems like a lot?

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 28, 2016

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

tseaver commented Mar 28, 2016

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver tseaver mentioned this pull request Mar 30, 2016
Should entry metadata be stored on the logger, or passed explicity? #1566
Closed
@dhermes dhermes mentioned this pull request Apr 1, 2016
Upgrading version to 0.12.0 #1689
Merged
@theacodes theacodes unassigned dhermes Sep 28, 2018
parthea pushed a commit that referenced this pull request Nov 24, 2025
@dizcology
fix: mock return_value should not populate oneof message fields (#1668)
1d28775
* fix: mock return_value should not populate oneof message fields
parthea pushed a commit that referenced this pull request Mar 9, 2026
@chandra-siri
chore: skip failing samples due to public access prevention enforceme…
b2b4f79
…nt (#1668)

skip failing samples due to public access prevention enforcement. 

More Details on b/469643064
parthea pushed a commit that referenced this pull request Apr 1, 2026
@Genesis929
feat: DataFrames.__getitem__ support for slice input (#1668)
2eba6fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tseaver @dhermes @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.