7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.10\n "
9
9
"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 "
11
11
"PO-Revision-Date : 2018-05-23 16:05+0000\n "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -1428,7 +1428,7 @@ msgid ""
1428
1428
msgstr ""
1429
1429
1430
1430
#: ../../library/logging.handlers.rst:1034
1431
- #: ../../library/logging.handlers.rst:1109
1431
+ #: ../../library/logging.handlers.rst:1123
1432
1432
msgid ""
1433
1433
"If you are using :mod:`multiprocessing`, you should avoid using :class:"
1434
1434
"`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`."
@@ -1467,25 +1467,41 @@ msgid ""
1467
1467
"the original intact."
1468
1468
msgstr ""
1469
1469
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
1471
1487
msgid ""
1472
1488
"Enqueues the record on the queue using ``put_nowait()``; you may want to "
1473
1489
"override this if you want to use blocking behaviour, or a timeout, or a "
1474
1490
"customized queue implementation."
1475
1491
msgstr ""
1476
1492
1477
- #: ../../library/logging.handlers.rst:1071
1493
+ #: ../../library/logging.handlers.rst:1085
1478
1494
msgid ""
1479
1495
"When created via configuration using :func:`~logging.config.dictConfig`, "
1480
1496
"this attribute will contain a :class:`QueueListener` instance for use with "
1481
1497
"this handler. Otherwise, it will be ``None``."
1482
1498
msgstr ""
1483
1499
1484
- #: ../../library/logging.handlers.rst:1080
1500
+ #: ../../library/logging.handlers.rst:1094
1485
1501
msgid "QueueListener"
1486
1502
msgstr "QueueListener"
1487
1503
1488
- #: ../../library/logging.handlers.rst:1084
1504
+ #: ../../library/logging.handlers.rst:1098
1489
1505
msgid ""
1490
1506
"The :class:`QueueListener` class, located in the :mod:`logging.handlers` "
1491
1507
"module, supports receiving logging messages from a queue, such as those "
@@ -1496,7 +1512,7 @@ msgid ""
1496
1512
"works hand-in-hand with :class:`QueueHandler`."
1497
1513
msgstr ""
1498
1514
1499
- #: ../../library/logging.handlers.rst:1092
1515
+ #: ../../library/logging.handlers.rst:1106
1500
1516
msgid ""
1501
1517
"Along with the :class:`QueueHandler` class, :class:`QueueListener` can be "
1502
1518
"used to let handlers do their work on a separate thread from the one which "
@@ -1506,7 +1522,7 @@ msgid ""
1506
1522
"an email via :class:`SMTPHandler`) are done on a separate thread."
1507
1523
msgstr ""
1508
1524
1509
- #: ../../library/logging.handlers.rst:1101
1525
+ #: ../../library/logging.handlers.rst:1115
1510
1526
msgid ""
1511
1527
"Returns a new instance of the :class:`QueueListener` class. The instance is "
1512
1528
"initialized with the queue to send messages to and a list of handlers which "
@@ -1517,90 +1533,90 @@ msgid ""
1517
1533
"class:`~queue.SimpleQueue` instances for *queue*."
1518
1534
msgstr ""
1519
1535
1520
- #: ../../library/logging.handlers.rst:1112
1536
+ #: ../../library/logging.handlers.rst:1126
1521
1537
msgid ""
1522
1538
"If ``respect_handler_level`` is ``True``, a handler's level is respected "
1523
1539
"(compared with the level for the message) when deciding whether to pass "
1524
1540
"messages to that handler; otherwise, the behaviour is as in previous Python "
1525
1541
"versions - to always pass each message to each handler."
1526
1542
msgstr ""
1527
1543
1528
- #: ../../library/logging.handlers.rst:1117
1544
+ #: ../../library/logging.handlers.rst:1131
1529
1545
msgid "The ``respect_handler_level`` argument was added."
1530
1546
msgstr "新增 ``respect_handler_level`` 引數。"
1531
1547
1532
- #: ../../library/logging.handlers.rst:1122
1548
+ #: ../../library/logging.handlers.rst:1136
1533
1549
msgid "Dequeues a record and return it, optionally blocking."
1534
1550
msgstr ""
1535
1551
1536
- #: ../../library/logging.handlers.rst:1124
1552
+ #: ../../library/logging.handlers.rst:1138
1537
1553
msgid ""
1538
1554
"The base implementation uses ``get()``. You may want to override this method "
1539
1555
"if you want to use timeouts or work with custom queue implementations."
1540
1556
msgstr ""
1541
1557
1542
- #: ../../library/logging.handlers.rst:1130
1558
+ #: ../../library/logging.handlers.rst:1144
1543
1559
msgid "Prepare a record for handling."
1544
1560
msgstr ""
1545
1561
1546
- #: ../../library/logging.handlers.rst:1132
1562
+ #: ../../library/logging.handlers.rst:1146
1547
1563
msgid ""
1548
1564
"This implementation just returns the passed-in record. You may want to "
1549
1565
"override this method if you need to do any custom marshalling or "
1550
1566
"manipulation of the record before passing it to the handlers."
1551
1567
msgstr ""
1552
1568
1553
- #: ../../library/logging.handlers.rst:1138
1569
+ #: ../../library/logging.handlers.rst:1152
1554
1570
msgid "Handle a record."
1555
1571
msgstr ""
1556
1572
1557
- #: ../../library/logging.handlers.rst:1140
1573
+ #: ../../library/logging.handlers.rst:1154
1558
1574
msgid ""
1559
1575
"This just loops through the handlers offering them the record to handle. The "
1560
1576
"actual object passed to the handlers is that which is returned from :meth:"
1561
1577
"`prepare`."
1562
1578
msgstr ""
1563
1579
1564
- #: ../../library/logging.handlers.rst:1146
1580
+ #: ../../library/logging.handlers.rst:1160
1565
1581
msgid "Starts the listener."
1566
1582
msgstr ""
1567
1583
1568
- #: ../../library/logging.handlers.rst:1148
1584
+ #: ../../library/logging.handlers.rst:1162
1569
1585
msgid ""
1570
1586
"This starts up a background thread to monitor the queue for LogRecords to "
1571
1587
"process."
1572
1588
msgstr ""
1573
1589
1574
- #: ../../library/logging.handlers.rst:1153
1590
+ #: ../../library/logging.handlers.rst:1167
1575
1591
msgid "Stops the listener."
1576
1592
msgstr ""
1577
1593
1578
- #: ../../library/logging.handlers.rst:1155
1594
+ #: ../../library/logging.handlers.rst:1169
1579
1595
msgid ""
1580
1596
"This asks the thread to terminate, and then waits for it to do so. Note that "
1581
1597
"if you don't call this before your application exits, there may be some "
1582
1598
"records still left on the queue, which won't be processed."
1583
1599
msgstr ""
1584
1600
1585
- #: ../../library/logging.handlers.rst:1161
1601
+ #: ../../library/logging.handlers.rst:1175
1586
1602
msgid ""
1587
1603
"Writes a sentinel to the queue to tell the listener to quit. This "
1588
1604
"implementation uses ``put_nowait()``. You may want to override this method "
1589
1605
"if you want to use timeouts or work with custom queue implementations."
1590
1606
msgstr ""
1591
1607
1592
- #: ../../library/logging.handlers.rst:1172
1608
+ #: ../../library/logging.handlers.rst:1186
1593
1609
msgid "Module :mod:`logging`"
1594
1610
msgstr ":mod:`logging` 模組"
1595
1611
1596
- #: ../../library/logging.handlers.rst:1172
1612
+ #: ../../library/logging.handlers.rst:1186
1597
1613
msgid "API reference for the logging module."
1598
1614
msgstr ""
1599
1615
1600
- #: ../../library/logging.handlers.rst:1174
1616
+ #: ../../library/logging.handlers.rst:1188
1601
1617
msgid "Module :mod:`logging.config`"
1602
1618
msgstr ":mod:`logging.config` 模組"
1603
1619
1604
- #: ../../library/logging.handlers.rst:1175
1620
+ #: ../../library/logging.handlers.rst:1189
1605
1621
msgid "Configuration API for the logging module."
1606
1622
msgstr ""
0 commit comments