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
43c6ef18
Kaydet (Commit)
43c6ef18
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
d859926b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
__init__.py
Lib/logging/__init__.py
+3
-2
handlers.py
Lib/logging/handlers.py
+4
-2
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
43c6ef18
# Copyright 2001-201
2
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-201
3
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,
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
Logging package for Python. Based on PEP 282 and comments thereto in
Logging package for Python. Based on PEP 282 and comments thereto in
comp.lang.python.
comp.lang.python.
Copyright (C) 2001-201
2
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-201
3
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
To use, simply 'import logging' and log away!
"""
"""
...
@@ -957,6 +957,7 @@ class FileHandler(StreamHandler):
...
@@ -957,6 +957,7 @@ class FileHandler(StreamHandler):
self
.
baseFilename
=
os
.
path
.
abspath
(
filename
)
self
.
baseFilename
=
os
.
path
.
abspath
(
filename
)
self
.
mode
=
mode
self
.
mode
=
mode
self
.
encoding
=
encoding
self
.
encoding
=
encoding
self
.
delay
=
delay
if
delay
:
if
delay
:
#We don't open the stream, but we still need to call the
#We don't open the stream, but we still need to call the
#Handler constructor to set level, formatter, lock etc.
#Handler constructor to set level, formatter, lock etc.
...
...
Lib/logging/handlers.py
Dosyayı görüntüle @
43c6ef18
...
@@ -174,7 +174,8 @@ class RotatingFileHandler(BaseRotatingHandler):
...
@@ -174,7 +174,8 @@ class RotatingFileHandler(BaseRotatingHandler):
if
os
.
path
.
exists
(
dfn
):
if
os
.
path
.
exists
(
dfn
):
os
.
remove
(
dfn
)
os
.
remove
(
dfn
)
self
.
rotate
(
self
.
baseFilename
,
dfn
)
self
.
rotate
(
self
.
baseFilename
,
dfn
)
self
.
stream
=
self
.
_open
()
if
not
self
.
delay
:
self
.
stream
=
self
.
_open
()
def
shouldRollover
(
self
,
record
):
def
shouldRollover
(
self
,
record
):
"""
"""
...
@@ -382,7 +383,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
...
@@ -382,7 +383,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
if
self
.
backupCount
>
0
:
if
self
.
backupCount
>
0
:
for
s
in
self
.
getFilesToDelete
():
for
s
in
self
.
getFilesToDelete
():
os
.
remove
(
s
)
os
.
remove
(
s
)
self
.
stream
=
self
.
_open
()
if
not
self
.
delay
:
self
.
stream
=
self
.
_open
()
newRolloverAt
=
self
.
computeRollover
(
currentTime
)
newRolloverAt
=
self
.
computeRollover
(
currentTime
)
while
newRolloverAt
<=
currentTime
:
while
newRolloverAt
<=
currentTime
:
newRolloverAt
=
newRolloverAt
+
self
.
interval
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