Skip to content

Conversation

@emmettbutler
Copy link
Contributor

This pull request moves logging into loggers that are specific to the current __name__. This allows code that uses the API client to set the logging level for the client without affecting other logging happening on the root logger.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 8, 2016
import datetime


logger = logging.getLogger(__name__)

This comment was marked as spam.

This comment was marked as spam.

@nathanielmanistaatgoogle
Copy link
Contributor

Please squash commits with each round of code review.

@nathanielmanistaatgoogle
Copy link
Contributor

@jonparrott, what do you think of this?

@theacodes
Copy link
Contributor

This is fine, but we might need to attach a nullhandler to the oauth2client logger ala urllib3:

https://github.com/shazow/urllib3/blob/master/urllib3/__init__.py#L23

@nathanielmanistaatgoogle
Copy link
Contributor

What dark sorcery is that?

@theacodes
Copy link
Contributor

It's not sorcery, it's just the right thing to do:

https://docs.python.org/2/howto/logging.html#configuring-logging-for-a-library

@nathanielmanistaatgoogle
Copy link
Contributor

Huh. Well that seems... curious.

Should @emmett9001 amend his commit to satisfy that guidance? (I suspect yes; @emmett9001, what do you think?)

@theacodes
Copy link
Contributor

Yes, please.

@emmettbutler
Copy link
Contributor Author

Just to clarify - are you suggesting that this code should be added somewhere in my existing diff? It's not clear where this should go.

@theacodes
Copy link
Contributor

Yes, it should go in googleapiclient/__init__.py.

@emmettbutler
Copy link
Contributor Author

See my updated diff for the NullHandler logic.

@theacodes
Copy link
Contributor

Looks good, except you still need this line: https://github.com/shazow/urllib3/blob/f0d98555ce6e3eeb379a8a659dff9d7f9ff42348/urllib3/__init__.py#L53

Once that's in and you've squashed commits, this LGTM.

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Mar 22, 2016
sadovnychyi and others added 10 commits March 22, 2016 09:37
Prevent breaking changes when one of dependencies updates its major
version.
The original:

* Violated pep8
* Used `print()` both as a statement and as a function, guaranteeing that the code won't work in either Python 2.5 or 3.x
* Didn't explain anything about what was happening.

This change fixes two of those problems.
@emmettbutler
Copy link
Contributor Author

I messed up the history by rebasing and merging master, so I've reopened a clean version of this pull request as #206. Please comment further there and close this one if you'd like.

@theacodes theacodes closed this Mar 22, 2016
@nathanielmanistaatgoogle
Copy link
Contributor

In the future please keep to one pull request for a desired change to the codebase; it makes for better forensics to have all the code review recorded in one place.

@emmettbutler
Copy link
Contributor Author

Will do. My previous pull request was corrupted by a bad merge - I'll be
sure to take care next time.

On Tuesday, March 22, 2016, Nathaniel Manista notifications@github.com
wrote:

In the future please keep to one pull request for a desired change to the
codebase; it makes for better forensics to have all the code review
recorded in one place.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#174 (comment)

akrherz pushed a commit to akrherz/google-api-python-client that referenced this pull request Apr 1, 2019
Rewind original stream body when refreshing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: no This human has *not* signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants