77msgstr ""
88"Project-Id-Version :Python 3.10\n "
99"Report-Msgid-Bugs-To :\n "
10- "POT-Creation-Date :2022-08-31 00:21 +0000\n "
10+ "POT-Creation-Date :2022-09-04 00:18 +0000\n "
1111"PO-Revision-Date :2018-05-23 16:05+0000\n "
1212"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
1313"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -1428,7 +1428,7 @@ msgid ""
14281428msgstr ""
14291429
14301430#: ../../library/logging.handlers.rst:1034
1431- #: ../../library/logging.handlers.rst:1109
1431+ #: ../../library/logging.handlers.rst:1123
14321432msgid ""
14331433"If you are using :mod:`multiprocessing`, you should avoid using :class:"
14341434"`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`."
@@ -1467,25 +1467,41 @@ msgid ""
14671467"the original intact."
14681468msgstr ""
14691469
1470- #: ../../library/logging.handlers.rst:1065
1470+ #: ../../library/logging.handlers.rst:1063
1471+ msgid ""
1472+ "The base implementation formats the message with arguments, sets the "
1473+ "``message`` and ``msg`` attributes to the formatted message and sets the "
1474+ "``args`` and ``exc_text`` attributes to ``None`` to allow pickling and to "
1475+ "prevent further attempts at formatting. This means that a handler on the :"
1476+ "class:`QueueListener` side won't have the information to do custom "
1477+ "formatting, e.g. of exceptions. You may wish to subclass ``QueueHandler`` "
1478+ "and override this method to e.g. avoid setting ``exc_text`` to ``None``. "
1479+ "Note that the ``message`` / ``msg`` / ``args`` changes are related to "
1480+ "ensuring the record is pickleable, and you might or might not be able to "
1481+ "avoid doing that depending on whether your ``args`` are pickleable. (Note "
1482+ "that you may have to consider not only your own code but also code in any "
1483+ "libraries that you use.)"
1484+ msgstr ""
1485+
1486+ #: ../../library/logging.handlers.rst:1079
14711487msgid ""
14721488"Enqueues the record on the queue using ``put_nowait()``; you may want to "
14731489"override this if you want to use blocking behaviour, or a timeout, or a "
14741490"customized queue implementation."
14751491msgstr ""
14761492
1477- #: ../../library/logging.handlers.rst:1071
1493+ #: ../../library/logging.handlers.rst:1085
14781494msgid ""
14791495"When created via configuration using :func:`~logging.config.dictConfig`, "
14801496"this attribute will contain a :class:`QueueListener` instance for use with "
14811497"this handler. Otherwise, it will be ``None``."
14821498msgstr ""
14831499
1484- #: ../../library/logging.handlers.rst:1080
1500+ #: ../../library/logging.handlers.rst:1094
14851501msgid "QueueListener"
14861502msgstr "QueueListener"
14871503
1488- #: ../../library/logging.handlers.rst:1084
1504+ #: ../../library/logging.handlers.rst:1098
14891505msgid ""
14901506"The :class:`QueueListener` class, located in the :mod:`logging.handlers` "
14911507"module, supports receiving logging messages from a queue, such as those "
@@ -1496,7 +1512,7 @@ msgid ""
14961512"works hand-in-hand with :class:`QueueHandler`."
14971513msgstr ""
14981514
1499- #: ../../library/logging.handlers.rst:1092
1515+ #: ../../library/logging.handlers.rst:1106
15001516msgid ""
15011517"Along with the :class:`QueueHandler` class, :class:`QueueListener` can be "
15021518"used to let handlers do their work on a separate thread from the one which "
@@ -1506,7 +1522,7 @@ msgid ""
15061522"an email via :class:`SMTPHandler`) are done on a separate thread."
15071523msgstr ""
15081524
1509- #: ../../library/logging.handlers.rst:1101
1525+ #: ../../library/logging.handlers.rst:1115
15101526msgid ""
15111527"Returns a new instance of the :class:`QueueListener` class. The instance is "
15121528"initialized with the queue to send messages to and a list of handlers which "
@@ -1517,90 +1533,90 @@ msgid ""
15171533"class:`~queue.SimpleQueue` instances for *queue*."
15181534msgstr ""
15191535
1520- #: ../../library/logging.handlers.rst:1112
1536+ #: ../../library/logging.handlers.rst:1126
15211537msgid ""
15221538"If ``respect_handler_level`` is ``True``, a handler's level is respected "
15231539"(compared with the level for the message) when deciding whether to pass "
15241540"messages to that handler; otherwise, the behaviour is as in previous Python "
15251541"versions - to always pass each message to each handler."
15261542msgstr ""
15271543
1528- #: ../../library/logging.handlers.rst:1117
1544+ #: ../../library/logging.handlers.rst:1131
15291545msgid "The ``respect_handler_level`` argument was added."
15301546msgstr "新增 ``respect_handler_level`` 引數。"
15311547
1532- #: ../../library/logging.handlers.rst:1122
1548+ #: ../../library/logging.handlers.rst:1136
15331549msgid "Dequeues a record and return it, optionally blocking."
15341550msgstr ""
15351551
1536- #: ../../library/logging.handlers.rst:1124
1552+ #: ../../library/logging.handlers.rst:1138
15371553msgid ""
15381554"The base implementation uses ``get()``. You may want to override this method "
15391555"if you want to use timeouts or work with custom queue implementations."
15401556msgstr ""
15411557
1542- #: ../../library/logging.handlers.rst:1130
1558+ #: ../../library/logging.handlers.rst:1144
15431559msgid "Prepare a record for handling."
15441560msgstr ""
15451561
1546- #: ../../library/logging.handlers.rst:1132
1562+ #: ../../library/logging.handlers.rst:1146
15471563msgid ""
15481564"This implementation just returns the passed-in record. You may want to "
15491565"override this method if you need to do any custom marshalling or "
15501566"manipulation of the record before passing it to the handlers."
15511567msgstr ""
15521568
1553- #: ../../library/logging.handlers.rst:1138
1569+ #: ../../library/logging.handlers.rst:1152
15541570msgid "Handle a record."
15551571msgstr ""
15561572
1557- #: ../../library/logging.handlers.rst:1140
1573+ #: ../../library/logging.handlers.rst:1154
15581574msgid ""
15591575"This just loops through the handlers offering them the record to handle. The "
15601576"actual object passed to the handlers is that which is returned from :meth:"
15611577"`prepare`."
15621578msgstr ""
15631579
1564- #: ../../library/logging.handlers.rst:1146
1580+ #: ../../library/logging.handlers.rst:1160
15651581msgid "Starts the listener."
15661582msgstr ""
15671583
1568- #: ../../library/logging.handlers.rst:1148
1584+ #: ../../library/logging.handlers.rst:1162
15691585msgid ""
15701586"This starts up a background thread to monitor the queue for LogRecords to "
15711587"process."
15721588msgstr ""
15731589
1574- #: ../../library/logging.handlers.rst:1153
1590+ #: ../../library/logging.handlers.rst:1167
15751591msgid "Stops the listener."
15761592msgstr ""
15771593
1578- #: ../../library/logging.handlers.rst:1155
1594+ #: ../../library/logging.handlers.rst:1169
15791595msgid ""
15801596"This asks the thread to terminate, and then waits for it to do so. Note that "
15811597"if you don't call this before your application exits, there may be some "
15821598"records still left on the queue, which won't be processed."
15831599msgstr ""
15841600
1585- #: ../../library/logging.handlers.rst:1161
1601+ #: ../../library/logging.handlers.rst:1175
15861602msgid ""
15871603"Writes a sentinel to the queue to tell the listener to quit. This "
15881604"implementation uses ``put_nowait()``. You may want to override this method "
15891605"if you want to use timeouts or work with custom queue implementations."
15901606msgstr ""
15911607
1592- #: ../../library/logging.handlers.rst:1172
1608+ #: ../../library/logging.handlers.rst:1186
15931609msgid "Module :mod:`logging`"
15941610msgstr ":mod:`logging` 模組"
15951611
1596- #: ../../library/logging.handlers.rst:1172
1612+ #: ../../library/logging.handlers.rst:1186
15971613msgid "API reference for the logging module."
15981614msgstr ""
15991615
1600- #: ../../library/logging.handlers.rst:1174
1616+ #: ../../library/logging.handlers.rst:1188
16011617msgid "Module :mod:`logging.config`"
16021618msgstr ":mod:`logging.config` 模組"
16031619
1604- #: ../../library/logging.handlers.rst:1175
1620+ #: ../../library/logging.handlers.rst:1189
16051621msgid "Configuration API for the logging module."
16061622msgstr ""