Django Book 翻译
菜单>:
TOC
返回
原文:
If youre the type of programmer who debugs using scattered ``print`` statements (we are), note that ``print`` statements have no effect in mod_python; they dont appear in the Apache log, as you might expect. If you have the need to print debugging information in a mod_python setup, youll probably want to use Pythons standard logging package. More information is available at `http://docs.python.org/lib/module-logging.html`_. Alternatively, you can or add the debugging information to the template of your page.
翻译:
如果你是一个用分散的 ``print`` 语句(我们就是这样)来调试的程序员,注意这 ``print`` 语 句在 mod_python 中是无效的;它不会像你希望的那样产生一个 Apache 日志。如果你需要在 mod_python 中打印调试信息,可能需要用到 Python 标准日志包(Pythons standard logging package)。 更多的信息请参见 `http://docs.python.org/lib/module-logging.html`_ 。另一个选择是在模板页面中加入调试信息。
备注:
译者: