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 — Merging logging-stdlib-handler-feature branch back into master by dhermes · Pull Request #2151 · googleapis/google-cloud-python

Conversation

@dhermes

@dhermes dhermes commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

Fixes #2102

Will likely fail the CLA check (since it contains someone else's commits) but we can just merge with a failed check.

/cc @waprin

Sorry, something went wrong.

Uh oh!

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

All reactions
@dhermes dhermes added hygiene api: logging Issues related to the Cloud Logging API. labels Aug 19, 2016
@dhermes dhermes assigned tseaver Aug 19, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 19, 2016
@dhermes

dhermes commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

@waprin There are two commits with subject "Add Logging Handler", and this one seems to not make sense:
9af9800

Can you vet?

All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

Doesn't make sense but let me quickly review

All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

Yeah bad commit that should be nuked

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes

dhermes commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

@waprin Where was it from? Stray commit from bad rebase? Also why did CLA bot not yell at me?

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes

dhermes commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

When you say nuke do mean folded into the original or just deleted?

All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

deleted

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes
dhermes force-pushed the fix-2102 branch 2 times, most recently from 54f3b94 to 1916cca Compare August 20, 2016 05:10
@dhermes

dhermes commented Aug 20, 2016 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@waprin I deleted and in the process decided to fold in the rebase changes needed to avoid the weird extra commit.

I made some other changes, but want them to be clear so it doesn't seem to nanny-ish (it is nanny-ish, but I think the changes are good?): https://gist.github.com/dhermes/02bf516901721cb3d2a3c48cd93958b0

As you can see the changes are the following:

  • Removing trailing empty lines in files
  • Changing double spaces for single spaces
  • Rewording / rewriting some docstrings (mostly to keep the first line below 80 chars, but also just adding more attention to detail a la Add Factory Methods for Metric/Resource/Timeseries #2071)
  • For "ugly indent" reasons constructing some dictionaries outside of function calls.
  • raised NotImplementedError instead of NotImplementedError() (does the same)

We can address outside this PR but I'm also pretty uncomfortable with

  • a module named gcloud.logging.handlers.handlers
  • the ad-hoc copy of a Client in BackgroundThreadTransport.__init__
All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 22, 2016 •
edited by dhermes
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

@dhermes changes look good.

a module named gcloud.logging.handlers.handlers

Why do you consider this a problem? I'm fine to change it, we could roll that code into __init__ or maybe gcloud.logging.handler.core? gcloud.logging.handlers.logging but that might also be confusing.

the ad-hoc copy of a Client in BackgroundThreadTransport.__init__

Just not sure what to do with this, if you want I can help with googleapis/oauth2client#549 if that will expedite anything.

All reactions

Sorry, something went wrong.

Uh oh!

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

Bill Prin added 2 commits August 22, 2016 11:47
Bill Prin @dhermes
Add Logging Handler
fa8761b
Bill Prin @dhermes
Add Async Background Thread transport
c9c761d
Refactors handlers into separate package

Adds background threaded transport

Adds fix to Batch commit to properly set log
name
@dhermes
dhermes force-pushed the fix-2102 branch from 1916cca to c9c761d Compare August 22, 2016 18:48
@dhermes
dhermes merged commit 0bf3b68 into googleapis:master Aug 22, 2016
@dhermes
dhermes deleted the fix-2102 branch August 22, 2016 20:10
@dhermes

dhermes commented Aug 22, 2016

Copy link
Copy Markdown
Contributor Author

@waprin It's the repeated name, just feels wrong / like the base-package isn't named correctly.

As for the copy, why is it there?

All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 22, 2016

Copy link
Copy Markdown
Contributor

The repeated name, I agree just struggling to think of better name. The whole thing is "add Python logging handler functionality", handler.py contains the actual logging handler class, the rest is support like transports etc.

The copy is there because since it uses the client on a background thread to write the logs, there's no guarantee the main thread isn't using the client at the same time. There's no way to lock the client and the system tests were occasionally failing due to this, copying seems the most sane approach.

All reactions

Sorry, something went wrong.

Uh oh!

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

@waprin

waprin commented Aug 22, 2016

Copy link
Copy Markdown
Contributor

gcloud.logging.handlers.logging is another option since its for Python logging but still repeats a name. logging_handler is a bit verbose but might be best way to disambiguate.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes dhermes mentioned this pull request Sep 19, 2016
Cut 0.19.0 release. #2270
Merged
parthea pushed a commit that referenced this pull request Apr 1, 2026
@shuoweil
feat: Replace ML.GENERATE_TEXT with AI.GENERATE for audio transcripti…
7051e0a
…on (#2151)

* change to ai.generate

* convert the input data type

* remove default value setting
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

@tseaver tseaver

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.

4 participants

@dhermes @waprin @tseaver @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.