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

Update logging samples to fit new style guide and match Node.js samples. #435

Merged
merged 5 commits into from
Aug 4, 2016

Conversation

theacodes
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 1, 2016
@theacodes
Copy link
Contributor Author

Sorry for the big change, I screwed myself because I wrote half of these before I realized there were existing samples.

@waprin
Copy link
Contributor

waprin commented Aug 1, 2016

This is going to break the include tags on https://cloud.google.com/logging/docs/api/tasks/creating-logs

@theacodes
Copy link
Contributor Author

I know, I'll handle updating docs.


print('Latest entries for logger {}:'.format(logger.name))

entries, token = logging_client.list_entries(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  1. If you don't loop on the token, you're going to have a bad time. The API will return 0 entries at first then return 5 on the next one, the token is also used to indicate "loading"

  2. You should just be able to do logger.list() now. There was a gcloud-python bug I fixed that should be released now)

googleapis/google-cloud-python#1848

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Jon Wayne Parrott added 2 commits August 3, 2016 10:05
Change-Id: I88ff16ebfd4fc2aac6413f97acd43482b15f9cdc
Change-Id: I33928ebde19a29074ac00a26b1eb4bcffe597bfd
@theacodes
Copy link
Contributor Author

@waprin updated, PTAL.

assert example_sink.filter_ == updated_filter


def ttest_delete(example_sink, capsys):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in test name

Change-Id: Ica6bf512afa3cd307a52d4726cf6629ef8678339
@@ -1,4 +1,10 @@
# Cloud Storage API Samples
# Stackdriver Logging v1 Samples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you messed something up, this is the storage README

Change-Id: I7304e8378e43ebf5ed6c8806b0efd52cacc44310
@@ -1,17 +1,28 @@
# Google Cloud Logging v1 Samples
# Stackdriver Logging v1 Samples

**Note that these samples are for the v1 Samples, using the Google API Client.
It's recommended you instead use the [Logging v2 samples](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/logging/api), which use the Google
Cloud client library.**

This section contains samples for [Google Cloud Logging](https://cloud.google.com/logging).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Google Cloud/Stackdriver/

?

@waprin
Copy link
Contributor

waprin commented Aug 4, 2016

code lgtm, offline organization comments

Change-Id: Ib6cf1f2d6e9009058ff93d199ad4ffb527208d47
dizcology pushed a commit that referenced this pull request Sep 11, 2023
…1.3 (#435)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
leahecole pushed a commit that referenced this pull request Sep 15, 2023
…1.3 (#435)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants