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 — Complete Python Sample Code for Logging API · Issue #312 · GoogleCloudPlatform/python-docs-samples

Complete Python Sample Code for Logging API #312

New issue
Copy link
New issue
Copy link
Closed
Closed
Complete Python Sample Code for Logging API#312
Copy link
Assignees
waprin
Labels
🚨This issue needs some love.triage meI really want to be triaged.

Description

@speedplane
speedplane
opened on Apr 29, 2016
Issue body actions

Most languages have sample code for writing to the Logging API, such as Node.js.

However the Python sample code only has sample code for reading the logging API, not writing to it. Notice also that there is very little sample code in the documentation.

Activity

Next
  1. waprin commented on Apr 29, 2016

    @waprin
    waprin
    on Apr 29, 2016
    Contributor
    More actions

    The reason there is not much sample code is that the idea is that you setup the fluentd logging agent (which is automatically setup on App Engine Flexible and for which we include instructions on GCE), and after that point you use standard Python logging. However you raise a valid point that the documentation is a little bit all over the place and a few more samples wouldn't hurt so I'll look into improving it.

  2. waprin
    self-assigned this
    on Apr 29, 2016
  3. speedplane commented on Apr 29, 2016

    @speedplane
    speedplane
    on Apr 29, 2016
    Author
    More actions

    Thanks @waprin.

    I recently moved to the Flexible environment from App Engine Classic. Unfortunately, as a result, my logs are no longer nested within each request. The logs are all denormalized and it is difficult to track which error log goes to which request.

    When I posted this on SO, I was told that in order to get nested logs back, I would need to write my own logger in python. So I started doing that, but quickly ran into a wall when I could not find any code on how to write a custom logger.

  4. theacodes commented on Apr 29, 2016

    @theacodes
    theacodes
    on Apr 29, 2016
    Contributor
    More actions

    See also: googleapis/google-cloud-python#1497

  5. theacodes commented on May 6, 2016

    @theacodes
    theacodes
    on May 6, 2016
    Contributor
    More actions

    @speedplane while we do plan to eventually provide a logger that goes directly to cloud logging as mentioned in googleapis/google-cloud-python#1497, the bundling feature is to be determined.

    App Engine Standard's serving path and sandbox restrictions allowed us to easily associate a request with associated logs. This is much more complicated in Flexible, so at the moment it's not currently possible to bundle logs to requests in the UI. Please keep in mind that Flexible is beta and will continue to evolve.

    We'll leave this bug open to provide samples for the documentation page. @waprin do you mind taking that on? If not, feel free to assign to me.

  6. theacodes
    added
    enhancement
    API/client update
    on May 9, 2016
  7. theacodes
    closed this as completedon Sep 19, 2016
  8. speedplane commented on Sep 20, 2016

    @speedplane
    speedplane
    on Sep 20, 2016
    Author
    More actions

    @jonparrott Just curious, why was this closed?

  9. waprin commented on Sep 20, 2016

    @waprin
    waprin
    on Sep 20, 2016
    Contributor
    More actions

    @speedplane we have docs and samples on writing logs in Python. We also have a Python logging handler you might want to check out. Adding the trace id to nest the logs isn't done yet, not sure if the UI will support it yet either, we can re-open while I investigate that.

  10. waprin
    reopened this on Sep 20, 2016
  11. theacodes commented on Feb 28, 2017

    @theacodes
    theacodes
    on Feb 28, 2017
    Contributor
    More actions

    (Closing due to inactivity, feel free to comment and we'll re-open)

  12. theacodes
    closed this as completedon Feb 28, 2017
  13. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 6, 2020
  14. 13 remaining items

  15. dandhlee
    added a commit that references this issue on Dec 2, 2022

    chore(samples): add and fix comments (#312)

    9d4cb2b
  16. holtskinner
    added 2 commits that reference this issue on Jan 3, 2023

    chore(python): add nox session to sort python imports (#312)

    38ecbbf

    chore(python): add nox session to sort python imports (#312)

    9429f13
  17. dandhlee
    added a commit that references this issue on Jan 5, 2023

    chore(python): add nox session to sort python imports (#312)

    b6a7d82
  18. Sita04
    added a commit that references this issue on Feb 7, 2023

    chore(deps): update all dependencies (#312)

    f582f74
  19. dizcology
    added a commit that references this issue on Jun 16, 2023

    chore(deps): update dependency google-cloud-bigquery-reservation to v…

    9ae6a03
  20. dizcology
    added a commit that references this issue on Jul 11, 2023

    chore(deps): update dependency google-cloud-bigquery-reservation to v…

    409096e
  21. dizcology
    added a commit that references this issue on Jul 20, 2023

    chore(deps): update dependency google-cloud-bigquery-reservation to v…

    aefb07b
  22. dandhlee
    added a commit that references this issue on Jul 24, 2023

    chore(deps): update dependency google-cloud-bigquery-reservation to v…

    71dd060
  23. dizcology
    added a commit that references this issue on Sep 11, 2023

    chore(python): add nox session to sort python imports (#312)

    01b433b
  24. leahecole
    added a commit that references this issue on Sep 15, 2023

    chore(python): add nox session to sort python imports (#312)

    0bd46ef
  25. chalmerlowe
    added 2 commits that reference this issue on Feb 18, 2026

    docs(samples): add samples for IN, NOT_IN, and != operators. (#312)

    7dca4f2

    chore(deps): update dependency google-cloud-bigquery to v2.18.0 (#312)

    0d58b12
  26. iennae
    added a commit that references this issue on Feb 19, 2026

    migrate code from googleapis/python-logging (#13844)

    1dcb59b
  27. iennae
    added a commit that references this issue on Feb 26, 2026

    chore: migrate code from googleapis/python-datastore (#13837)

    6dc735a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @waprin
    waprin

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.