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
6d7e2965
Kaydet (Commit)
6d7e2965
authored
Eyl 06, 2013
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18940: Handled low-volume logging when delay is True.
üst
6971f2e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
handlers.py
Lib/logging/handlers.py
+6
-2
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
6d7e2965
...
@@ -137,7 +137,9 @@ class RotatingFileHandler(BaseRotatingHandler):
...
@@ -137,7 +137,9 @@ class RotatingFileHandler(BaseRotatingHandler):
dfn
=
self
.
baseFilename
+
".1"
dfn
=
self
.
baseFilename
+
".1"
if
os
.
path
.
exists
(
dfn
):
if
os
.
path
.
exists
(
dfn
):
os
.
remove
(
dfn
)
os
.
remove
(
dfn
)
os
.
rename
(
self
.
baseFilename
,
dfn
)
# Issue 18940: A file may not have been created if delay is True.
if
os
.
path
.
exists
(
self
.
baseFilename
):
os
.
rename
(
self
.
baseFilename
,
dfn
)
#print "%s -> %s" % (self.baseFilename, dfn)
#print "%s -> %s" % (self.baseFilename, dfn)
self
.
stream
=
self
.
_open
()
self
.
stream
=
self
.
_open
()
...
@@ -343,7 +345,9 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
...
@@ -343,7 +345,9 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
dfn
=
self
.
baseFilename
+
"."
+
time
.
strftime
(
self
.
suffix
,
timeTuple
)
dfn
=
self
.
baseFilename
+
"."
+
time
.
strftime
(
self
.
suffix
,
timeTuple
)
if
os
.
path
.
exists
(
dfn
):
if
os
.
path
.
exists
(
dfn
):
os
.
remove
(
dfn
)
os
.
remove
(
dfn
)
os
.
rename
(
self
.
baseFilename
,
dfn
)
# Issue 18940: A file may not have been created if delay is True.
if
os
.
path
.
exists
(
self
.
baseFilename
):
os
.
rename
(
self
.
baseFilename
,
dfn
)
if
self
.
backupCount
>
0
:
if
self
.
backupCount
>
0
:
# find the oldest log file and delete it
# find the oldest log file and delete it
#s = glob.glob(self.baseFilename + ".20*")
#s = glob.glob(self.baseFilename + ".20*")
...
...
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