samjbr / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

No handlers could be found for logger "oauth2client.util" #225

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[Use this form for both apiclient and oauth2client issues]

What steps will reproduce the problem?
1. Use oauth2client

What is the expected output? What do you see instead?
When using oauth2client, I often see the warning message:

No handlers could be found for logger "oauth2client.util"

I think the issue is related to the fact that this module actually gets an 
instance of the logger, rather than simply using the logging module to log 
errors, etc:

logger = logging.getLogger(__name__)

To prevent this issue, use the logging module, or specify a handler for the 
logger.

Original issue reported on code.google.com by kbris...@google.com on 6 Dec 2012 at 2:13

GoogleCodeExporter commented 8 years ago
You should be configuring the logging in your application, once you do the 
warning message will go away:

  http://stackoverflow.com/questions/345991/python-no-handlers-could-be-found-for-logger-opengl-error

See, for example, how this is done in the command-line samples:

  http://code.google.com/p/google-api-python-client/source/browse/samples/plus/plus.py#97

Original comment by jcgregorio@google.com on 6 Dec 2012 at 8:58

GoogleCodeExporter commented 8 years ago
Got it, thanks!

Original comment by kbris...@google.com on 19 Dec 2012 at 12:00

GoogleCodeExporter commented 8 years ago

Original comment by jcgregorio@google.com on 19 Dec 2012 at 3:47

GoogleCodeExporter commented 8 years ago
Not fixed yet. Fix available https://codereview.appspot.com/14090043 More info 
https://code.google.com/p/rainforce/wiki/WartsOfPython#Logging_hidden_magic_(2.x
_tested,_3.x_unknown)

Original comment by techtonik@gmail.com on 28 Sep 2013 at 9:27

GoogleCodeExporter commented 8 years ago
See my comment in issue 303 for an easy fix.

Original comment by dead-Ser...@secdev.com on 3 Sep 2014 at 7:11