Python pycrypto disables logging - google app engine

寵の児 提交于 2019-12-30 07:27:15

问题


I am using python with google app engine. Working on Macbook air 2012 with python 2.7.

The problem I have is:

import logging

logging.info("test") # this works before importing crypto

import Crypto

logging.info("test2") # this one does not after importing crypto

How does crypto change logging and how can I fix it so that I can use logging normally again in my python app?

Update1:

It seems that some python errors are also not displayed in the logging from app engine, as well as correct python code also giving a '500 internal server error' which is only visible in a browser console when testing the app in localhost.

Update2:

I have completely disabled any imports of Python Crypto ( which is provide by Google App Engine ), and now my logging works correctly, displaying all my own testing logging lines and python errors. This of course does not solve the problem as I need the Crypto module. Using Crypto in this case blocks the ability to test any code because you can not see errors in the logging.

Update3:

To be clear, I have included the crypto library in app.yaml exactly as instructed by Google App Engine docs. The crypto library itself works fine, the problem is that it breaks logging in my python app engine app.

来源:https://stackoverflow.com/questions/32562070/python-pycrypto-disables-logging-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!