Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9f62d743
Kaydet (Commit)
9f62d743
authored
Şub 10, 2011
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add an entry for logging.
üst
3029affc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
3.2.rst
Doc/whatsnew/3.2.rst
+39
-2
No files found.
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
9f62d743
...
@@ -1140,6 +1140,44 @@ decorator, :func:`~reprlib.recursive_repr`, for detecting recursive calls to
...
@@ -1140,6 +1140,44 @@ decorator, :func:`~reprlib.recursive_repr`, for detecting recursive calls to
(Contributed by Raymond Hettinger in :issue:`9826` and :issue:`9840`.)
(Contributed by Raymond Hettinger in :issue:`9826` and :issue:`9840`.)
logging
-------
In addition to dictionary based configuration described above, the
:mod:`logging` package has many other improvements.
The logging documentation has been augmented by a :ref:`basic tutorial
<logging-basic-tutorial>`\, an :ref:`advanced tutorial
<logging-advanced-tutorial>`\, and a :ref:`cookbook <logging-cookbook>` of
logging recipes. These documents are the fastest way to learn about logging.
The :func:`logging.basicConfig` set-up function gained a *style* argument to
support three different types of string formatting. It defaults to "%" for
traditional %-formatting, can be set to "{" for the new :meth:`str.format` style, or
can be set to "$" for the shell-style formatting provided by
:class:`string.Template`. The following three configurations are equivalent::
>>> from logging import basicConfig
>>> basicConfig(style='%', format="%(name)s -> %(levelname)s: %(message)s")
>>> basicConfig(style='{', format="{name} -> {levelname} {message}")
>>> basicConfig(style='$', format="$name -> $levelname: $message")
If no configuration is set-up before a logging event occurs, there is now a
default configuration using a :class:`~logging.StreamHandler` directed to
:attr:`sys.stderr` for events of ``WARNING`` level or higher. Formerly, an
event occurring before a configuration was set-up would either raise an
exception or silently drop the event depending on the value of
:attr:`logging.raiseExceptions`. The new default handler is stored in
:attr:`logging.lastResort`.
The use of filters has been simplified. Instead of creating a
:class:`~logging.Filter` object, the predicate can be any Python callable that
returns *True* or *False*.
There were a number of other improvements that add flexibility and simplify
configuration. See the module documentation for a full listing of changes in
Python 3.2.
csv
csv
---
---
...
@@ -2127,8 +2165,7 @@ reading directly from dictionaries and strings.
...
@@ -2127,8 +2165,7 @@ reading directly from dictionaries and strings.
(All changes contributed by Łukasz Langa.)
(All changes contributed by Łukasz Langa.)
.. XXX show a difflib example
.. XXX consider showing a difflib example
.. XXX add entry for logging changes other than the dict config pep
urllib.parse
urllib.parse
------------
------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment