My project uses these python libraries:
requests==2.18.4
requests-toolbelt==0.8.0
and calls this at the main.py
requests_toolbelt.adapters.appengine.monkeypatch()
App engine is logging Error message inside google cloud logs when using the requests library:
AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets. To use sockets directly instead of URLFetch see https://urllib3.readthedocs.io/en/latest/reference/urllib3.contrib.html.
AppEnginePlatformWarning: URLFetch does not support granular timeout settings, reverting to total or default URLFetch timeout.
but this is actually just Warning and my code works as expected. But this log is problematic for me because I cannot know if there is really error or not in the logs when I see the statistics. That's why I have to log it as warning somehow.
Here is one stackoverflow answer. This answer states that if this warning is shown on GAE standard environment then the code will work without problem. So it's really warning for me. How to log it as such? AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets