0
出于某种原因,当我使用logging.debug
函数时,在生产服务器上看不到调试日志消息。 logging.info
,logging.warning
和logging.error
函数工作得很好。我使用的应用程序引擎Django和在我settings.py
文件进行如下设置:App Engine logging.debug未登录服务器
def config_logging(in_dict):
import logging
logging.basicConfig(
level = logging.DEBUG,
format = '%(asctime)s %(levelname)s %(message)s',
)
LOGGING_CONFIG = "settings.config_logging"
还要注意的是,当我使用--debug
标志的开发服务器上,会显示正确的日志。
我不明白为什么调试日志没有被记录。有什么建议么?
你的答案是为开发者。服务器,对吧?该问题也发生在现场服务器上。 – speedplane
我打算在我的问题中说生产服务器,而不是开发者。服务器。我修正了这一点。 – speedplane