@@ -1500,10 +1500,16 @@ msgid ""
15001500"credentials, you should also specify secure=True so that your userid and "
15011501"password are not passed in cleartext across the wire."
15021502msgstr ""
1503+ "返回一个 :class:`HTTPHandler` 类的新实例。 *host* 可以为 ``host:port`` "
1504+ "的形式,如果你需要使用指定端口号的话。 如果没有指定 *method*,则会使用 ``GET``。 如果 *secure* 为真值,则将使用 HTTPS"
1505+ " 连接。 *context* 形参可以设为一个 :class:`ssl.SSLContext` 实例以配置用于 HTTPS 连接的 SSL 设置。 "
1506+ "如果指定了 *credentials*,它应当为包含 userid 和 password 的二元组,该元组将被放入使用 Basic 验证的 HTTP "
1507+ "'Authorization' 标头中。 如果你指定了 credentials,你还应当指定 secure=True 这样你的 userid 和 "
1508+ "password 就不会以明文在线路上传输。"
15031509
15041510#: ../../library/logging.handlers.rst:947
15051511msgid "The *context* parameter was added."
1506- msgstr ""
1512+ msgstr "增加了 *context* 形参。 "
15071513
15081514#: ../../library/logging.handlers.rst:952
15091515msgid ""
@@ -1513,13 +1519,16 @@ msgid ""
15131519":class:`~logging.LogRecord` is to be sent to the web server, or if more "
15141520"specific customization of what's sent to the server is required."
15151521msgstr ""
1522+ "基于 ``record`` 提供一个字典,它将被执行 URL 编码并发送至 Web 服务器。 默认实现仅返回 ``record.__dict__``。 "
1523+ "在只需将 :class:`~logging.LogRecord` 的某个子集发送至 Web "
1524+ "服务器,或者需要对发送至服务器的内容进行更多定制时可以重载此方法。"
15161525
15171526#: ../../library/logging.handlers.rst:960
15181527msgid ""
15191528"Sends the record to the Web server as a URL-encoded dictionary. The "
15201529":meth:`mapLogRecord` method is used to convert the record to the dictionary "
15211530"to be sent."
1522- msgstr ""
1531+ msgstr "将记录以经 URL 编码的形式发送至 Web 服务器。 会使用 :meth:`mapLogRecord` 方法来将要发送的记录转换为字典。 "
15231532
15241533#: ../../library/logging.handlers.rst:964
15251534msgid ""
@@ -1530,17 +1539,23 @@ msgid ""
15301539"calls :meth:`mapLogRecord` and then :func:`urllib.parse.urlencode` to encode"
15311540" the dictionary in a form suitable for sending to a Web server."
15321541msgstr ""
1542+ "由于记录发送至 Web 服务器所需的预处理与通用的格式化操作不同,使用 :meth:`~logging.Handler.setFormatter` "
1543+ "来指定一个 :class:`~logging.Formatter` 用于 :class:`HTTPHandler` 是没有效果的。 此处理程序不会调用 "
1544+ ":meth:`~logging.Handler.format`,而是调用 :meth:`mapLogRecord` 然后再调用 "
1545+ ":func:`urllib.parse.urlencode` 来以适合发送至 Web 服务器的形式对字典进行编码。"
15331546
15341547#: ../../library/logging.handlers.rst:977
15351548msgid "QueueHandler"
1536- msgstr ""
1549+ msgstr "QueueHandler "
15371550
15381551#: ../../library/logging.handlers.rst:981
15391552msgid ""
15401553"The :class:`QueueHandler` class, located in the :mod:`logging.handlers` "
15411554"module, supports sending logging messages to a queue, such as those "
15421555"implemented in the :mod:`queue` or :mod:`multiprocessing` modules."
15431556msgstr ""
1557+ ":class:`QueueHandler` 类位于 :mod:`logging.handlers` 模块,它支持将日志记录消息发送到一个队列,例如在 "
1558+ ":mod:`queue` 或 :mod:`multiprocessing` 模块中实现的队列。"
15441559
15451560#: ../../library/logging.handlers.rst:985
15461561msgid ""
0 commit comments