@@ -1654,32 +1654,32 @@ msgstr "再把 ``stdout`` 重定向到 ``/dev/null``,结果将如下所示:"
16541654msgid ""
16551655"In this case, the message #5 printed to ``stdout`` doesn't appear, as "
16561656"expected."
1657- msgstr "在这种情况下,与预期一致,打印到 ``stdout`` 标准输出的消息#5不会出现 。"
1657+ msgstr "这符合预期,输出到 ``stdout`` 的 #5 信息不会显示出来 。"
16581658
16591659#: ../../howto/logging-cookbook.rst:2583
16601660msgid ""
16611661"Of course, the approach described here can be generalised, for example to "
16621662"attach logging filters temporarily. Note that the above code works in Python"
16631663" 2 as well as Python 3."
1664- msgstr "当然,这里描述的方法可以概括,例如临时附加日志记录过滤器。 请注意,上面的代码适用于Python 2以及Python 3 。"
1664+ msgstr "当然,上述做法可以推广到其他应用,比如临时加入日志过滤器。 请注意,上述代码对 Python 2 和 3 均适用 。"
16651665
16661666#: ../../howto/logging-cookbook.rst:2591
16671667msgid "A CLI application starter template"
1668- msgstr ""
1668+ msgstr "命令行日志应用起步 "
16691669
16701670#: ../../howto/logging-cookbook.rst:2593
16711671msgid "Here's an example which shows how you can:"
1672- msgstr ""
1672+ msgstr "下面的示例提供了如下功能: "
16731673
16741674#: ../../howto/logging-cookbook.rst:2595
16751675msgid "Use a logging level based on command-line arguments"
1676- msgstr ""
1676+ msgstr "根据命令行参数确定日志级别 "
16771677
16781678#: ../../howto/logging-cookbook.rst:2596
16791679msgid ""
16801680"Dispatch to multiple subcommands in separate files, all logging at the same "
16811681"level in a consistent way"
1682- msgstr ""
1682+ msgstr "在单独的文件中分发多条子命令,同一级别的日志子命令均以一致的方式记录。 "
16831683
16841684#: ../../howto/logging-cookbook.rst:2598
16851685msgid "Make use of simple, minimal configuration"
@@ -1695,6 +1695,9 @@ msgid ""
16951695"verbosity of the application via a command-line argument, defaulting to "
16961696"``logging.INFO``. Here's one way that ``app.py`` could be written::"
16971697msgstr ""
1698+ "假定有一个命令行应用程序,用于停止、启动或重新启动某些服务。为了便于演示,不妨将 ``app.py`` 作为应用程序的主代码文件,并在 "
1699+ "``start.py``、 ``stop.py``和 ``restart.py`` "
1700+ "中实现单独的命令。再假定要通过命令行参数控制应用程序的日志粒度,默认为 ``logging.INFO`` 。以下是 ``app.py`` 的一个示例:"
16981701
16991702#: ../../howto/logging-cookbook.rst:2649
17001703msgid ""
0 commit comments