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 example to retrieve the default handler #3691

Merged
merged 6 commits into from
May 6, 2020

Conversation

darrencarlton
Copy link
Contributor

This change makes the code sample usable for App Engine apps as well as other environments.

When a Logging client asks for the default handler, Logging returns a handler that is appropriate for the environment the client is running in. When the code is running in App Engine, AppEngineHandler is returned, and this is needed to enable key logging features in App Engine, such as correlating app logs with request logs.

Here's info about get_default_handler():
https://googleapis.dev/python/logging/latest/client.html

This change also updates branding to "Cloud Logging".

@darrencarlton darrencarlton requested a review from a team as a code owner May 5, 2020 21:36
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2020
@@ -1,6 +1,6 @@
#!/usr/bin/env python

# Copyright 2016 Google Inc. All Rights Reserved.
# Copyright 2020 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't update the copyright year

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@@ -1,6 +1,6 @@
#!/usr/bin/env python

# Copyright 2016 Google Inc. All Rights Reserved.
# Copyright 2020 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@kurtisvg kurtisvg added the automerge Merge the pull request once unit tests and other checks pass. label May 6, 2020
@kurtisvg kurtisvg merged commit 8adee1e into GoogleCloudPlatform:master May 6, 2020
busunkim96 pushed a commit to busunkim96/python-logging that referenced this pull request Oct 12, 2020
…leCloudPlatform/python-docs-samples#3691)

* Update handler.py

* Update README.rst

* Update handler.py

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
busunkim96 pushed a commit to busunkim96/python-logging that referenced this pull request Oct 30, 2020
…leCloudPlatform/python-docs-samples#3691)

* Update handler.py

* Update README.rst

* Update handler.py

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
busunkim96 pushed a commit to googleapis/python-logging that referenced this pull request Oct 30, 2020
…leCloudPlatform/python-docs-samples#3691)

* Update handler.py

* Update README.rst

* Update handler.py

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. 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