Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 63a530f

Browse files
committed
[po] auto sync bot
1 parent 09be426 commit 63a530f

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

howto/logging.po

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,16 +1067,20 @@ msgid ""
10671067
"handler's level is set to ``WARNING``, so all events at this and greater "
10681068
"severities will be output."
10691069
msgstr ""
1070+
"事件使用“最后的处理程序”输出,存储在 ``logging.lastResort`` 中。 这个内部处理程序与任何记录器都没有关联,它的作用类似于 "
1071+
":class:`~logging.StreamHandler` ,它将事件描述消息写入 ``sys.stderr`` "
1072+
"的当前值(因此服从任何可能的重定向影响)。 "
1073+
"没有对消息进行格式化——只打印裸事件描述消息。处理程序的级别设置为“警告”,因此将输出此级别和更高级别的所有事件。"
10701074

10711075
#: ../../howto/logging.rst:787
10721076
msgid ""
10731077
"To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to "
10741078
"``None``."
1075-
msgstr ""
1079+
msgstr "要获得 3.2 之前的行为, ``logging.lastResort`` 可以设置为 ``None`` 。"
10761080

10771081
#: ../../howto/logging.rst:792
10781082
msgid "Configuring Logging for a Library"
1079-
msgstr ""
1083+
msgstr "配置库的日志记录"
10801084

10811085
#: ../../howto/logging.rst:794
10821086
msgid ""
@@ -1088,6 +1092,8 @@ msgid ""
10881092
" of severity ``WARNING`` and greater will be printed to ``sys.stderr``. This"
10891093
" is regarded as the best default behaviour."
10901094
msgstr ""
1095+
"在开发使用日志记录的库时,你应该注意记录库如何使用日志记录——例如,使用的记录器的名称。还需要考虑其日志记录配置。如果应用程序不使用日志记录,并且库代码进行日志记录调用,那么(如上一节所述)严重性为“WARNING”及更高级别的事件将打印到"
1096+
" ``sys.stderr`` 。这被认为是最好的默认行为。"
10911097

10921098
#: ../../howto/logging.rst:802
10931099
msgid ""
@@ -1100,6 +1106,8 @@ msgid ""
11001106
" suitably configured then logging calls made in library code will send "
11011107
"output to those handlers, as normal."
11021108
msgstr ""
1109+
"如果由于某种原因,你 *不* "
1110+
"希望在没有任何日志记录配置的情况下打印这些消息,则可以将无操作处理程序附加到库的顶级记录器。这样可以避免打印消息,因为将始终为库的事件找到处理程序:它不会产生任何输出。如果库用户配置应用程序使用的日志记录,可能是配置将添加一些处理程序,如果级别已适当配置,则在库代码中进行的日志记录调用将正常地将输出发送给这些处理程序。"
11031111

11041112
#: ../../howto/logging.rst:811
11051113
msgid ""
@@ -1133,7 +1141,7 @@ msgstr ""
11331141

11341142
#: ../../howto/logging.rst:837
11351143
msgid "Logging Levels"
1136-
msgstr ""
1144+
msgstr "日志级别"
11371145

11381146
#: ../../howto/logging.rst:839
11391147
msgid ""
@@ -1146,7 +1154,7 @@ msgstr ""
11461154

11471155
#: ../../howto/logging.rst:846
11481156
msgid "Numeric value"
1149-
msgstr ""
1157+
msgstr "数值"
11501158

11511159
#: ../../howto/logging.rst:848
11521160
msgid "50"
@@ -1222,7 +1230,7 @@ msgstr ""
12221230

12231231
#: ../../howto/logging.rst:895
12241232
msgid "Custom Levels"
1225-
msgstr ""
1233+
msgstr "自定义级别"
12261234

12271235
#: ../../howto/logging.rst:897
12281236
msgid ""
@@ -1236,22 +1244,26 @@ msgid ""
12361244
"difficult for the using developer to control and/or interpret, because a "
12371245
"given numeric value might mean different things for different libraries."
12381246
msgstr ""
1247+
"定义你自己的级别是可能的,但不一定是必要的,因为现有级别是根据实践经验选择的。但是,如果你确信需要自定义级别,那么在执行此操作时应特别小心,如果你正在开发库,则"
1248+
" *定义自定义级别可能是一个非常糟糕的主意* 。 "
1249+
"这是因为如果多个库作者都定义了他们自己的自定义级别,那么使用开发人员很难控制和解释这些多个库的日志记录输出,因为给定的数值可能意味着不同的东西 "
1250+
"对于不同的库。"
12391251

12401252
#: ../../howto/logging.rst:910
12411253
msgid "Useful Handlers"
1242-
msgstr ""
1254+
msgstr "有用的处理程序"
12431255

12441256
#: ../../howto/logging.rst:912
12451257
msgid ""
12461258
"In addition to the base :class:`Handler` class, many useful subclasses are "
12471259
"provided:"
1248-
msgstr ""
1260+
msgstr "作为 :class:`Handler` 基类的补充,提供了很多有用的子类:"
12491261

12501262
#: ../../howto/logging.rst:915
12511263
msgid ""
12521264
":class:`StreamHandler` instances send messages to streams (file-like "
12531265
"objects)."
1254-
msgstr ""
1266+
msgstr ":class:`StreamHandler` 实例发送消息到流(类似文件对象)。"
12551267

12561268
#: ../../howto/logging.rst:918
12571269
msgid ":class:`FileHandler` instances send messages to disk files."
@@ -1344,11 +1356,11 @@ msgstr ""
13441356

13451357
#: ../../howto/logging.rst:966
13461358
msgid "The :class:`NullHandler` class."
1347-
msgstr ""
1359+
msgstr ":class:`NullHandler` 类。"
13481360

13491361
#: ../../howto/logging.rst:969
13501362
msgid "The :class:`~handlers.QueueHandler` class."
1351-
msgstr ""
1363+
msgstr ":class:`~handlers.QueueHandler` 类。"
13521364

13531365
#: ../../howto/logging.rst:972
13541366
msgid ""

0 commit comments

Comments
 (0)