在谷歌应用程序引擎上,如何更改dev_appserver.py的默认日志记录级别? [英] On the google app engine, how do I change the default logging level of the dev_appserver.py?

查看:225
本文介绍了在谷歌应用程序引擎上,如何更改dev_appserver.py的默认日志记录级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dev_appserver.py(Python谷歌应用程序引擎的本地开发服务器)发出大量无用的INFO消息。我想把这个WARN或ERROR。我怎么做到这一点?



我试过以下,但它没有效果...

  logger = logging.getLogger()
logger.setLevel(logging.WARN)

有什么想法?

解决方案

目前,在命令行中,只能降低日志级别通过'-d'命令行选项进行DEBUG。






如果你不害怕编辑脚本,对于

  DEFAULT_ARGS = {
...
ARG_LOG_LEVEL:logging.INFO,

位于C:\程序文件\Google\google_appengine\google\appengine\tools\dev_appserver_main中。 py

Dev_appserver.py (the local development server for Python google app engine) spews tons of useless INFO messages. I would like to up this to WARN or ERROR. How can I do that?

I've tried the following, but it has no effect...

logger = logging.getLogger()
logger.setLevel(logging.WARN)

Any ideas?

解决方案

Currently, from the command line, you can only lower the logging level to DEBUG by the '-d' command line option.


If you're not afraid of editing the scripts, look for

DEFAULT_ARGS = {
  ...
  ARG_LOG_LEVEL: logging.INFO,

in C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_main.py

这篇关于在谷歌应用程序引擎上,如何更改dev_appserver.py的默认日志记录级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆