7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2022-10-15 20:43 +0000\n "
10
+ "POT-Creation-Date : 2023-01-28 00:15 +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- "
@@ -664,37 +664,78 @@ msgstr ""
664
664
665
665
#: ../../library/logging.config.rst:528
666
666
msgid ""
667
+ "The values for keys such as ``bar``, ``spam`` and ``answer`` in the above "
668
+ "example should not be configuration dictionaries or references such as "
669
+ "``cfg://foo`` or ``ext://bar``, because they will not be processed by the "
670
+ "configuration machinery, but passed to the callable as-is."
671
+ msgstr ""
672
+
673
+ #: ../../library/logging.config.rst:533
674
+ msgid ""
667
675
"The key ``'()'`` has been used as the special key because it is not a valid "
668
676
"keyword parameter name, and so will not clash with the names of the keyword "
669
677
"arguments used in the call. The ``'()'`` also serves as a mnemonic that the "
670
678
"corresponding value is a callable."
671
679
msgstr ""
672
680
673
- #: ../../library/logging.config.rst:533
681
+ #: ../../library/logging.config.rst:538
674
682
msgid ""
675
683
"The ``filters`` member of ``handlers`` and ``loggers`` can take filter "
676
684
"instances in addition to ids."
677
685
msgstr ""
678
686
679
- #: ../../library/logging.config.rst:537
687
+ #: ../../library/logging.config.rst:542
680
688
msgid ""
681
689
"You can also specify a special key ``'.'`` whose value is a dictionary is a "
682
690
"mapping of attribute names to values. If found, the specified attributes "
683
691
"will be set on the user-defined object before it is returned. Thus, with the "
684
692
"following configuration::"
685
693
msgstr ""
686
694
687
- #: ../../library/logging.config.rst:553
695
+ #: ../../library/logging.config.rst:558
688
696
msgid ""
689
697
"the returned formatter will have attribute ``foo`` set to ``'bar'`` and "
690
698
"attribute ``baz`` set to ``'bozz'``."
691
699
msgstr ""
692
700
693
- #: ../../library/logging.config.rst:560
701
+ #: ../../library/logging.config.rst:561
702
+ msgid ""
703
+ "The values for attributes such as ``foo`` and ``baz`` in the above example "
704
+ "should not be configuration dictionaries or references such as ``cfg://foo`` "
705
+ "or ``ext://bar``, because they will not be processed by the configuration "
706
+ "machinery, but set as attribute values as-is."
707
+ msgstr ""
708
+
709
+ #: ../../library/logging.config.rst:570
710
+ msgid "Handler configuration order"
711
+ msgstr ""
712
+
713
+ #: ../../library/logging.config.rst:572
714
+ msgid ""
715
+ "Handlers are configured in alphabetical order of their keys, and a "
716
+ "configured handler replaces the configuration dictionary in (a working copy "
717
+ "of) the ``handlers`` dictionary in the schema. If you use a construct such "
718
+ "as ``cfg://handlers.foo``, then initially ``handlers['foo']`` points to the "
719
+ "configuration dictionary for the handler named ``foo``, and later (once that "
720
+ "handler has been configured) it points to the configured handler instance. "
721
+ "Thus, ``cfg://handlers.foo`` could resolve to either a dictionary or a "
722
+ "handler instance. In general, it is wise to name handlers in a way such that "
723
+ "dependent handlers are configured _after_ any handlers they depend on; that "
724
+ "allows something like ``cfg://handlers.foo`` to be used in configuring a "
725
+ "handler that depends on handler ``foo``. If that dependent handler were "
726
+ "named ``bar``, problems would result, because the configuration of ``bar`` "
727
+ "would be attempted before that of ``foo``, and ``foo`` would not yet have "
728
+ "been configured. However, if the dependent handler were named ``foobar``, it "
729
+ "would be configured after ``foo``, with the result that ``cfg://handlers."
730
+ "foo`` would resolve to configured handler ``foo``, and not its configuration "
731
+ "dictionary."
732
+ msgstr ""
733
+
734
+ #: ../../library/logging.config.rst:593
694
735
msgid "Access to external objects"
695
736
msgstr ""
696
737
697
- #: ../../library/logging.config.rst:562
738
+ #: ../../library/logging.config.rst:595
698
739
msgid ""
699
740
"There are times where a configuration needs to refer to objects external to "
700
741
"the configuration, for example ``sys.stderr``. If the configuration dict is "
@@ -709,7 +750,7 @@ msgid ""
709
750
"import mechanisms."
710
751
msgstr ""
711
752
712
- #: ../../library/logging.config.rst:575
753
+ #: ../../library/logging.config.rst:608
713
754
msgid ""
714
755
"The handling of such prefixes is done in a way analogous to protocol "
715
756
"handling: there is a generic mechanism to look for prefixes which match the "
@@ -719,11 +760,11 @@ msgid ""
719
760
"prefix is not recognised, then the string value will be left as-is."
720
761
msgstr ""
721
762
722
- #: ../../library/logging.config.rst:587
763
+ #: ../../library/logging.config.rst:620
723
764
msgid "Access to internal objects"
724
765
msgstr ""
725
766
726
- #: ../../library/logging.config.rst:589
767
+ #: ../../library/logging.config.rst:622
727
768
msgid ""
728
769
"As well as external objects, there is sometimes also a need to refer to "
729
770
"objects in the configuration. This will be done implicitly by the "
@@ -734,7 +775,7 @@ msgid ""
734
775
"and resolve to the appropriate destination object."
735
776
msgstr ""
736
777
737
- #: ../../library/logging.config.rst:597
778
+ #: ../../library/logging.config.rst:630
738
779
msgid ""
739
780
"However, a more generic mechanism is needed for user-defined objects which "
740
781
"are not known to the :mod:`logging` module. For example, consider :class:"
@@ -748,7 +789,7 @@ msgid ""
748
789
"resolution system allows the user to specify:"
749
790
msgstr ""
750
791
751
- #: ../../library/logging.config.rst:619
792
+ #: ../../library/logging.config.rst:652
752
793
msgid ""
753
794
"The literal string ``'cfg://handlers.file'`` will be resolved in an "
754
795
"analogous way to strings with the ``ext://`` prefix, but looking in the "
@@ -757,7 +798,7 @@ msgid ""
757
798
"format``. Thus, given the following snippet:"
758
799
msgstr ""
759
800
760
- #: ../../library/logging.config.rst:637
801
+ #: ../../library/logging.config.rst:670
761
802
msgid ""
762
803
"in the configuration, the string ``'cfg://handlers'`` would resolve to the "
763
804
"dict with key ``handlers``, the string ``'cfg://handlers.email`` would "
@@ -773,7 +814,7 @@ msgid ""
773
814
"to the string value if needed."
774
815
msgstr ""
775
816
776
- #: ../../library/logging.config.rst:651
817
+ #: ../../library/logging.config.rst:684
777
818
msgid ""
778
819
"Given a string ``cfg://handlers.myhandler.mykey.123``, this will resolve to "
779
820
"``config_dict['handlers']['myhandler']['mykey']['123']``. If the string is "
@@ -783,11 +824,11 @@ msgid ""
783
824
"['mykey']['123']`` if that fails."
784
825
msgstr ""
785
826
786
- #: ../../library/logging.config.rst:663
827
+ #: ../../library/logging.config.rst:696
787
828
msgid "Import resolution and custom importers"
788
829
msgstr ""
789
830
790
- #: ../../library/logging.config.rst:665
831
+ #: ../../library/logging.config.rst:698
791
832
msgid ""
792
833
"Import resolution, by default, uses the builtin :func:`__import__` function "
793
834
"to do its importing. You may want to replace this with your own importing "
@@ -799,17 +840,17 @@ msgid ""
799
840
"instance level, you need to wrap it with :func:`staticmethod`. For example::"
800
841
msgstr ""
801
842
802
- #: ../../library/logging.config.rst:680
843
+ #: ../../library/logging.config.rst:713
803
844
msgid ""
804
845
"You don't need to wrap with :func:`staticmethod` if you're setting the "
805
846
"import callable on a configurator *instance*."
806
847
msgstr ""
807
848
808
- #: ../../library/logging.config.rst:687
849
+ #: ../../library/logging.config.rst:720
809
850
msgid "Configuration file format"
810
851
msgstr ""
811
852
812
- #: ../../library/logging.config.rst:689
853
+ #: ../../library/logging.config.rst:722
813
854
msgid ""
814
855
"The configuration file format understood by :func:`fileConfig` is based on :"
815
856
"mod:`configparser` functionality. The file must contain sections called "
@@ -826,7 +867,7 @@ msgid ""
826
867
"specified in a section called ``[logger_root]``."
827
868
msgstr ""
828
869
829
- #: ../../library/logging.config.rst:704
870
+ #: ../../library/logging.config.rst:737
830
871
msgid ""
831
872
"The :func:`fileConfig` API is older than the :func:`dictConfig` API and does "
832
873
"not provide functionality to cover certain aspects of logging. For example, "
@@ -839,39 +880,39 @@ msgid ""
839
880
"when it's convenient to do so."
840
881
msgstr ""
841
882
842
- #: ../../library/logging.config.rst:714
883
+ #: ../../library/logging.config.rst:747
843
884
msgid "Examples of these sections in the file are given below."
844
885
msgstr ""
845
886
846
- #: ../../library/logging.config.rst:727
887
+ #: ../../library/logging.config.rst:760
847
888
msgid ""
848
889
"The root logger must specify a level and a list of handlers. An example of a "
849
890
"root logger section is given below."
850
891
msgstr ""
851
892
852
- #: ../../library/logging.config.rst:736
893
+ #: ../../library/logging.config.rst:769
853
894
msgid ""
854
895
"The ``level`` entry can be one of ``DEBUG, INFO, WARNING, ERROR, CRITICAL`` "
855
896
"or ``NOTSET``. For the root logger only, ``NOTSET`` means that all messages "
856
897
"will be logged. Level values are :ref:`evaluated <func-eval>` in the context "
857
898
"of the ``logging`` package's namespace."
858
899
msgstr ""
859
900
860
- #: ../../library/logging.config.rst:741
901
+ #: ../../library/logging.config.rst:774
861
902
msgid ""
862
903
"The ``handlers`` entry is a comma-separated list of handler names, which "
863
904
"must appear in the ``[handlers]`` section. These names must appear in the "
864
905
"``[handlers]`` section and have corresponding sections in the configuration "
865
906
"file."
866
907
msgstr ""
867
908
868
- #: ../../library/logging.config.rst:746
909
+ #: ../../library/logging.config.rst:779
869
910
msgid ""
870
911
"For loggers other than the root logger, some additional information is "
871
912
"required. This is illustrated by the following example."
872
913
msgstr ""
873
914
874
- #: ../../library/logging.config.rst:757
915
+ #: ../../library/logging.config.rst:790
875
916
msgid ""
876
917
"The ``level`` and ``handlers`` entries are interpreted as for the root "
877
918
"logger, except that if a non-root logger's level is specified as ``NOTSET``, "
@@ -884,28 +925,28 @@ msgid ""
884
925
"application to get the logger."
885
926
msgstr ""
886
927
887
- #: ../../library/logging.config.rst:766
928
+ #: ../../library/logging.config.rst:799
888
929
msgid ""
889
930
"Sections which specify handler configuration are exemplified by the "
890
931
"following."
891
932
msgstr ""
892
933
893
- #: ../../library/logging.config.rst:776
934
+ #: ../../library/logging.config.rst:809
894
935
msgid ""
895
936
"The ``class`` entry indicates the handler's class (as determined by :func:"
896
937
"`eval` in the ``logging`` package's namespace). The ``level`` is interpreted "
897
938
"as for loggers, and ``NOTSET`` is taken to mean 'log everything'."
898
939
msgstr ""
899
940
900
- #: ../../library/logging.config.rst:780
941
+ #: ../../library/logging.config.rst:813
901
942
msgid ""
902
943
"The ``formatter`` entry indicates the key name of the formatter for this "
903
944
"handler. If blank, a default formatter (``logging._defaultFormatter``) is "
904
945
"used. If a name is specified, it must appear in the ``[formatters]`` section "
905
946
"and have a corresponding section in the configuration file."
906
947
msgstr ""
907
948
908
- #: ../../library/logging.config.rst:785
949
+ #: ../../library/logging.config.rst:818
909
950
msgid ""
910
951
"The ``args`` entry, when :ref:`evaluated <func-eval>` in the context of the "
911
952
"``logging`` package's namespace, is the list of arguments to the constructor "
@@ -914,27 +955,27 @@ msgid ""
914
955
"provided, it defaults to ``()``."
915
956
msgstr ""
916
957
917
- #: ../../library/logging.config.rst:791
958
+ #: ../../library/logging.config.rst:824
918
959
msgid ""
919
960
"The optional ``kwargs`` entry, when :ref:`evaluated <func-eval>` in the "
920
961
"context of the ``logging`` package's namespace, is the keyword argument dict "
921
962
"to the constructor for the handler class. If not provided, it defaults to "
922
963
"``{}``."
923
964
msgstr ""
924
965
925
- #: ../../library/logging.config.rst:848
966
+ #: ../../library/logging.config.rst:881
926
967
msgid ""
927
968
"Sections which specify formatter configuration are typified by the following."
928
969
msgstr ""
929
970
930
- #: ../../library/logging.config.rst:859
971
+ #: ../../library/logging.config.rst:892
931
972
msgid ""
932
973
"The arguments for the formatter configuration are the same as the keys in "
933
974
"the dictionary schema :ref:`formatters section <logging-config-dictschema-"
934
975
"formatters>`."
935
976
msgstr ""
936
977
937
- #: ../../library/logging.config.rst:865
978
+ #: ../../library/logging.config.rst:898
938
979
msgid ""
939
980
"Due to the use of :func:`eval` as described above, there are potential "
940
981
"security risks which result from using the :func:`listen` to send and "
@@ -943,18 +984,18 @@ msgid ""
943
984
"`listen` documentation for more information."
944
985
msgstr ""
945
986
946
- #: ../../library/logging.config.rst:874
987
+ #: ../../library/logging.config.rst:907
947
988
msgid "Module :mod:`logging`"
948
989
msgstr ":mod:`logging` 模組"
949
990
950
- #: ../../library/logging.config.rst:874
991
+ #: ../../library/logging.config.rst:907
951
992
msgid "API reference for the logging module."
952
993
msgstr ""
953
994
954
- #: ../../library/logging.config.rst:876
995
+ #: ../../library/logging.config.rst:909
955
996
msgid "Module :mod:`logging.handlers`"
956
997
msgstr ":mod:`logging.handlers` 模組"
957
998
958
- #: ../../library/logging.config.rst:877
999
+ #: ../../library/logging.config.rst:910
959
1000
msgid "Useful handlers included with the logging module."
960
1001
msgstr ""
0 commit comments