Saturday, 7 September 2013

Python Logger Activated After Twilio?

Python Logger Activated After Twilio?

I've created a standard barebones flask app which outputs the standard
request lines like so:
127.0.0.1 - - [07/Sep/2013 13:23:34] "GET /static/lib/jquery.js HTTP/1.1"
304 -
127.0.0.1 - - [07/Sep/2013 13:23:34] "GET
/static/lib/bootstrap/js/bootstrap.min.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:34] "GET /static/lib/md5.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:34] "GET /static/lib/gmaps.js HTTP/1.1"
304 -
127.0.0.1 - - [07/Sep/2013 13:23:34] "GET /static/lib/ckeditor/ckeditor.js
HTTP/1.1" 304 -
But as soon as I initialize a TwilioRestClient instance from the python
Twilio driver, logging starts to look like this
127.0.0.1 - - [07/Sep/2013 13:23:55] "GET /static/lib/jquery.js HTTP/1.1"
304 -
INFO:werkzeug:127.0.0.1 - - [07/Sep/2013 13:23:55] "GET
/static/lib/jquery.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:55] "GET
/static/lib/bootstrap/js/bootstrap.min.js HTTP/1.1" 304 -
INFO:werkzeug:127.0.0.1 - - [07/Sep/2013 13:23:55] "GET
/static/lib/bootstrap/js/bootstrap.min.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:55] "GET /static/lib/md5.js HTTP/1.1" 304 -
INFO:werkzeug:127.0.0.1 - - [07/Sep/2013 13:23:55] "GET /static/lib/md5.js
HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:55] "GET /static/lib/gmaps.js HTTP/1.1"
304 -
INFO:werkzeug:127.0.0.1 - - [07/Sep/2013 13:23:55] "GET
/static/lib/gmaps.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Sep/2013 13:23:55] "GET /static/lib/ckeditor/ckeditor.js
HTTP/1.1" 304 -
INFO:werkzeug:127.0.0.1 - - [07/Sep/2013 13:23:55] "GET
/static/lib/ckeditor/ckeditor.js HTTP/1.1" 304 -
The INFO:werkzeug: prefix leads me to believe werkzeug uses the default
python logger but doesn't have it "enabled" but Twilio comes in and turns
it on. I'm sure that's not exactly how it works, but you get the idea.
Do I have to manually disable python logger as soon as I initialize
Twilio? How so? Can I leave it enabled for only Twilio?
Thanks!

No comments:

Post a Comment