问题
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