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
fb03696f
Kaydet (Commit)
fb03696f
authored
Eyl 06, 2013
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18941: Respected delay when doing rollover.
üst
6d7e2965
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
__init__.py
Lib/logging/__init__.py
+1
-0
handlers.py
Lib/logging/handlers.py
+4
-9
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
fb03696f
...
...
@@ -893,6 +893,7 @@ class FileHandler(StreamHandler):
self
.
baseFilename
=
os
.
path
.
abspath
(
filename
)
self
.
mode
=
mode
self
.
encoding
=
encoding
self
.
delay
=
delay
if
delay
:
#We don't open the stream, but we still need to call the
#Handler constructor to set level, formatter, lock etc.
...
...
Lib/logging/handlers.py
Dosyayı görüntüle @
fb03696f
...
...
@@ -140,8 +140,8 @@ class RotatingFileHandler(BaseRotatingHandler):
# 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)
self
.
stream
=
self
.
_open
()
if
not
self
.
delay
:
self
.
stream
=
self
.
_open
()
def
shouldRollover
(
self
,
record
):
"""
...
...
@@ -349,15 +349,10 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
if
os
.
path
.
exists
(
self
.
baseFilename
):
os
.
rename
(
self
.
baseFilename
,
dfn
)
if
self
.
backupCount
>
0
:
# find the oldest log file and delete it
#s = glob.glob(self.baseFilename + ".20*")
#if len(s) > self.backupCount:
# s.sort()
# os.remove(s[0])
for
s
in
self
.
getFilesToDelete
():
os
.
remove
(
s
)
#print "%s -> %s" % (self.baseFilename, dfn)
self
.
stream
=
self
.
_open
()
if
not
self
.
delay
:
self
.
stream
=
self
.
_open
()
newRolloverAt
=
self
.
computeRollover
(
currentTime
)
while
newRolloverAt
<=
currentTime
:
newRolloverAt
=
newRolloverAt
+
self
.
interval
...
...
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