Skip to content

Commit 03bd4b0

Browse files
sync with cpython cc5870a1
1 parent 66e16b6 commit 03bd4b0

File tree

12 files changed

+753
-724
lines changed

12 files changed

+753
-724
lines changed

howto/logging.po

Lines changed: 58 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-10-11 17:13+0000\n"
11+
"POT-Creation-Date: 2024-02-02 00:03+0000\n"
1212
"PO-Revision-Date: 2018-05-23 14:36+0000\n"
1313
"Last-Translator: Adrian Liaw <[email protected]>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -711,10 +711,10 @@ msgstr ""
711711
msgid ""
712712
"The :meth:`~Handler.setLevel` method, just as in logger objects, specifies "
713713
"the lowest severity that will be dispatched to the appropriate destination. "
714-
"Why are there two :func:`setLevel` methods? The level set in the logger "
715-
"determines which severity of messages it will pass to its handlers. The "
716-
"level set in each handler determines which messages that handler will send "
717-
"on."
714+
"Why are there two :meth:`~Handler.setLevel` methods? The level set in the "
715+
"logger determines which severity of messages it will pass to its handlers. "
716+
"The level set in each handler determines which messages that handler will "
717+
"send on."
718718
msgstr ""
719719

720720
#: ../../howto/logging.rst:528
@@ -923,46 +923,40 @@ msgstr ""
923923
msgid ""
924924
"If no logging configuration is provided, it is possible to have a situation "
925925
"where a logging event needs to be output, but no handlers can be found to "
926-
"output the event. The behaviour of the logging package in these "
927-
"circumstances is dependent on the Python version."
926+
"output the event."
928927
msgstr ""
929928

930-
#: ../../howto/logging.rst:781
929+
#: ../../howto/logging.rst:780
930+
msgid ""
931+
"The event is output using a 'handler of last resort', stored in :data:"
932+
"`lastResort`. This internal handler is not associated with any logger, and "
933+
"acts like a :class:`~logging.StreamHandler` which writes the event "
934+
"description message to the current value of ``sys.stderr`` (therefore "
935+
"respecting any redirections which may be in effect). No formatting is done "
936+
"on the message - just the bare event description message is printed. The "
937+
"handler's level is set to ``WARNING``, so all events at this and greater "
938+
"severities will be output."
939+
msgstr ""
940+
941+
#: ../../howto/logging.rst:791
931942
msgid "For versions of Python prior to 3.2, the behaviour is as follows:"
932943
msgstr ""
933944

934-
#: ../../howto/logging.rst:783
945+
#: ../../howto/logging.rst:793
935946
msgid ""
936-
"If *logging.raiseExceptions* is ``False`` (production mode), the event is "
947+
"If :data:`raiseExceptions` is ``False`` (production mode), the event is "
937948
"silently dropped."
938949
msgstr ""
939950

940-
#: ../../howto/logging.rst:786
951+
#: ../../howto/logging.rst:796
941952
msgid ""
942-
"If *logging.raiseExceptions* is ``True`` (development mode), a message 'No "
953+
"If :data:`raiseExceptions` is ``True`` (development mode), a message 'No "
943954
"handlers could be found for logger X.Y.Z' is printed once."
944955
msgstr ""
945956

946-
#: ../../howto/logging.rst:789
947-
msgid "In Python 3.2 and later, the behaviour is as follows:"
948-
msgstr ""
949-
950-
#: ../../howto/logging.rst:791
951-
msgid ""
952-
"The event is output using a 'handler of last resort', stored in ``logging."
953-
"lastResort``. This internal handler is not associated with any logger, and "
954-
"acts like a :class:`~logging.StreamHandler` which writes the event "
955-
"description message to the current value of ``sys.stderr`` (therefore "
956-
"respecting any redirections which may be in effect). No formatting is done "
957-
"on the message - just the bare event description message is printed. The "
958-
"handler's level is set to ``WARNING``, so all events at this and greater "
959-
"severities will be output."
960-
msgstr ""
961-
962-
#: ../../howto/logging.rst:800
957+
#: ../../howto/logging.rst:799
963958
msgid ""
964-
"To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to "
965-
"``None``."
959+
"To obtain the pre-3.2 behaviour, :data:`lastResort` can be set to ``None``."
966960
msgstr ""
967961

968962
#: ../../howto/logging.rst:805
@@ -1267,8 +1261,8 @@ msgstr ""
12671261

12681262
#: ../../howto/logging.rst:1001
12691263
msgid ""
1270-
"For formatting multiple messages in a batch, instances of :class:`~handlers."
1271-
"BufferingFormatter` can be used. In addition to the format string (which is "
1264+
"For formatting multiple messages in a batch, instances of :class:"
1265+
"`BufferingFormatter` can be used. In addition to the format string (which is "
12721266
"applied to each message in the batch), there is provision for header and "
12731267
"trailer format strings."
12741268
msgstr ""
@@ -1318,19 +1312,19 @@ msgid ""
13181312
"the exception is swallowed."
13191313
msgstr ""
13201314

1321-
#: ../../howto/logging.rst:1038
1315+
#: ../../howto/logging.rst:1039
13221316
msgid ""
13231317
"The default value of :data:`raiseExceptions` is ``True``. This is because "
13241318
"during development, you typically want to be notified of any exceptions that "
13251319
"occur. It's advised that you set :data:`raiseExceptions` to ``False`` for "
13261320
"production usage."
13271321
msgstr ""
13281322

1329-
#: ../../howto/logging.rst:1048
1323+
#: ../../howto/logging.rst:1049
13301324
msgid "Using arbitrary objects as messages"
13311325
msgstr ""
13321326

1333-
#: ../../howto/logging.rst:1050
1327+
#: ../../howto/logging.rst:1051
13341328
msgid ""
13351329
"In the preceding sections and examples, it has been assumed that the message "
13361330
"passed when logging the event is a string. However, this is not the only "
@@ -1342,11 +1336,11 @@ msgid ""
13421336
"the wire."
13431337
msgstr ""
13441338

1345-
#: ../../howto/logging.rst:1061
1339+
#: ../../howto/logging.rst:1062
13461340
msgid "Optimization"
13471341
msgstr ""
13481342

1349-
#: ../../howto/logging.rst:1063
1343+
#: ../../howto/logging.rst:1064
13501344
msgid ""
13511345
"Formatting of message arguments is deferred until it cannot be avoided. "
13521346
"However, computing the arguments passed to the logging method can also be "
@@ -1357,13 +1351,13 @@ msgid ""
13571351
"code like this::"
13581352
msgstr ""
13591353

1360-
#: ../../howto/logging.rst:1075
1354+
#: ../../howto/logging.rst:1076
13611355
msgid ""
1362-
"so that if the logger's threshold is set above ``DEBUG``, the calls to :func:"
1363-
"`expensive_func1` and :func:`expensive_func2` are never made."
1356+
"so that if the logger's threshold is set above ``DEBUG``, the calls to "
1357+
"``expensive_func1`` and ``expensive_func2`` are never made."
13641358
msgstr ""
13651359

1366-
#: ../../howto/logging.rst:1078
1360+
#: ../../howto/logging.rst:1079
13671361
msgid ""
13681362
"In some cases, :meth:`~Logger.isEnabledFor` can itself be more expensive "
13691363
"than you'd like (e.g. for deeply nested loggers where an explicit level is "
@@ -1375,102 +1369,102 @@ msgid ""
13751369
"while the application is running (which is not all that common)."
13761370
msgstr ""
13771371

1378-
#: ../../howto/logging.rst:1087
1372+
#: ../../howto/logging.rst:1088
13791373
msgid ""
13801374
"There are other optimizations which can be made for specific applications "
13811375
"which need more precise control over what logging information is collected. "
13821376
"Here's a list of things you can do to avoid processing during logging which "
13831377
"you don't need:"
13841378
msgstr ""
13851379

1386-
#: ../../howto/logging.rst:1093
1380+
#: ../../howto/logging.rst:1094
13871381
msgid "What you don't want to collect"
13881382
msgstr ""
13891383

1390-
#: ../../howto/logging.rst:1093
1384+
#: ../../howto/logging.rst:1094
13911385
msgid "How to avoid collecting it"
13921386
msgstr ""
13931387

1394-
#: ../../howto/logging.rst:1095
1388+
#: ../../howto/logging.rst:1096
13951389
msgid "Information about where calls were made from."
13961390
msgstr ""
13971391

1398-
#: ../../howto/logging.rst:1095
1392+
#: ../../howto/logging.rst:1096
13991393
msgid ""
14001394
"Set ``logging._srcfile`` to ``None``. This avoids calling :func:`sys."
14011395
"_getframe`, which may help to speed up your code in environments like PyPy "
14021396
"(which can't speed up code that uses :func:`sys._getframe`)."
14031397
msgstr ""
14041398

1405-
#: ../../howto/logging.rst:1101
1399+
#: ../../howto/logging.rst:1102
14061400
msgid "Threading information."
14071401
msgstr ""
14081402

1409-
#: ../../howto/logging.rst:1101
1403+
#: ../../howto/logging.rst:1102
14101404
msgid "Set ``logging.logThreads`` to ``False``."
14111405
msgstr ""
14121406

1413-
#: ../../howto/logging.rst:1103
1407+
#: ../../howto/logging.rst:1104
14141408
msgid "Current process ID (:func:`os.getpid`)"
14151409
msgstr ""
14161410

1417-
#: ../../howto/logging.rst:1103
1411+
#: ../../howto/logging.rst:1104
14181412
msgid "Set ``logging.logProcesses`` to ``False``."
14191413
msgstr ""
14201414

1421-
#: ../../howto/logging.rst:1105
1415+
#: ../../howto/logging.rst:1106
14221416
msgid ""
14231417
"Current process name when using ``multiprocessing`` to manage multiple "
14241418
"processes."
14251419
msgstr ""
14261420

1427-
#: ../../howto/logging.rst:1105
1421+
#: ../../howto/logging.rst:1106
14281422
msgid "Set ``logging.logMultiprocessing`` to ``False``."
14291423
msgstr ""
14301424

1431-
#: ../../howto/logging.rst:1108
1425+
#: ../../howto/logging.rst:1109
14321426
msgid "Current :class:`asyncio.Task` name when using ``asyncio``."
14331427
msgstr ""
14341428

1435-
#: ../../howto/logging.rst:1108
1429+
#: ../../howto/logging.rst:1109
14361430
msgid "Set ``logging.logAsyncioTasks`` to ``False``."
14371431
msgstr ""
14381432

1439-
#: ../../howto/logging.rst:1112
1433+
#: ../../howto/logging.rst:1113
14401434
msgid ""
14411435
"Also note that the core logging module only includes the basic handlers. If "
14421436
"you don't import :mod:`logging.handlers` and :mod:`logging.config`, they "
14431437
"won't take up any memory."
14441438
msgstr ""
14451439

1446-
#: ../../howto/logging.rst:1119
1440+
#: ../../howto/logging.rst:1120
14471441
msgid "Other resources"
14481442
msgstr ""
14491443

1450-
#: ../../howto/logging.rst:1124
1444+
#: ../../howto/logging.rst:1125
14511445
msgid "Module :mod:`logging`"
14521446
msgstr ":mod:`logging` 模組"
14531447

1454-
#: ../../howto/logging.rst:1124
1448+
#: ../../howto/logging.rst:1125
14551449
msgid "API reference for the logging module."
14561450
msgstr ""
14571451

1458-
#: ../../howto/logging.rst:1127
1452+
#: ../../howto/logging.rst:1128
14591453
msgid "Module :mod:`logging.config`"
14601454
msgstr ":mod:`logging.config` 模組"
14611455

1462-
#: ../../howto/logging.rst:1127
1456+
#: ../../howto/logging.rst:1128
14631457
msgid "Configuration API for the logging module."
14641458
msgstr ""
14651459

1466-
#: ../../howto/logging.rst:1130
1460+
#: ../../howto/logging.rst:1131
14671461
msgid "Module :mod:`logging.handlers`"
14681462
msgstr ":mod:`logging.handlers` 模組"
14691463

1470-
#: ../../howto/logging.rst:1130
1464+
#: ../../howto/logging.rst:1131
14711465
msgid "Useful handlers included with the logging module."
14721466
msgstr ""
14731467

1474-
#: ../../howto/logging.rst:1132
1468+
#: ../../howto/logging.rst:1133
14751469
msgid ":ref:`A logging cookbook <logging-cookbook>`"
14761470
msgstr ""

0 commit comments

Comments
 (0)