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
22246fdd
Kaydet (Commit)
22246fdd
authored
Eki 20, 2010
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
logging: clarified Filter documentation.
üst
9450cc05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
logging.rst
Doc/library/logging.rst
+10
-6
No files found.
Doc/library/logging.rst
Dosyayı görüntüle @
22246fdd
...
...
@@ -3068,14 +3068,18 @@ etc.) This means that events which have been generated by descendant loggers
will not be filtered by a logger'
s
filter
setting
,
unless
the
filter
has
also
been
applied
to
those
descendant
loggers
.
You
don
't actually need to subclass ``Filter``: you can pass any instance
which has a ``filter`` method with the same semantics.
.. versionchanged:: 3.2
You
don
't need to create specialized ``Filter`` classes: you can use a plain
function (or other callable) as a filter. The filtering logic will check to
see if the filter object has a ``filter`` attribute: if it does, it'
s
assumed
to
be
a
``
Filter
``
and
its
:
meth
:`~
Filter
.
filter
`
method
is
called
.
Otherwise
,
it
's assumed to be a callable and called with the record as the single
parameter. The result should conform to that of :meth:`~Filter.filter`.
You don'
t
need
to
create
specialized
``
Filter
``
classes
,
or
use
other
classes
with
a
``
filter
``
method
:
you
can
use
a
function
(
or
other
callable
)
as
a
filter
.
The
filtering
logic
will
check
to
see
if
the
filter
object
has
a
``
filter
``
attribute
:
if
it
does
,
it
's assumed to be a ``Filter`` and its
:meth:`~Filter.filter` method is called. Otherwise, it'
s
assumed
to
be
a
callable
and
called
with
the
record
as
the
single
parameter
.
The
returned
value
should
conform
to
that
returned
by
:
meth
:`~
Filter
.
filter
`.
Other
uses
for
filters
^^^^^^^^^^^^^^^^^^^^^^
...
...
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