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
f42d95eb
Kaydet (Commit)
f42d95eb
authored
Şub 21, 2004
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added close() (which flushes) to BufferingHandler and tidied MemoryHandler.close() [SF #901330]
üst
3f9f84de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
handlers.py
Lib/logging/handlers.py
+10
-2
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
f42d95eb
# Copyright 2001-200
2
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-200
4
by Vinay Sajip. All Rights Reserved.
#
#
# Permission to use, copy, modify, and distribute this software and its
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# documentation for any purpose and without fee is hereby granted,
...
@@ -726,6 +726,15 @@ class BufferingHandler(logging.Handler):
...
@@ -726,6 +726,15 @@ class BufferingHandler(logging.Handler):
"""
"""
self
.
buffer
=
[]
self
.
buffer
=
[]
def
close
(
self
):
"""
Close the handler.
This version just flushes and chains to the parent class' close().
"""
self
.
flush
()
logging
.
Handler
.
close
(
self
)
class
MemoryHandler
(
BufferingHandler
):
class
MemoryHandler
(
BufferingHandler
):
"""
"""
A handler class which buffers logging records in memory, periodically
A handler class which buffers logging records in memory, periodically
...
@@ -774,5 +783,4 @@ class MemoryHandler(BufferingHandler):
...
@@ -774,5 +783,4 @@ class MemoryHandler(BufferingHandler):
"""
"""
self
.
flush
()
self
.
flush
()
self
.
target
=
None
self
.
target
=
None
self
.
buffer
=
[]
BufferingHandler
.
close
(
self
)
BufferingHandler
.
close
(
self
)
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