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
609364a9
Kaydet (Commit)
609364a9
authored
Agu 30, 2010
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Logging: removed some old commented out code.
üst
8b7da623
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
__init__.py
Lib/logging/__init__.py
+0
-4
handlers.py
Lib/logging/handlers.py
+1
-10
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
609364a9
...
...
@@ -935,16 +935,13 @@ class PlaceHolder(object):
"""
Initialize with the specified logger being a child of this placeholder.
"""
#self.loggers = [alogger]
self
.
loggerMap
=
{
alogger
:
None
}
def
append
(
self
,
alogger
):
"""
Add the specified logger as a child of this placeholder.
"""
#if alogger not in self.loggers:
if
alogger
not
in
self
.
loggerMap
:
#self.loggers.append(alogger)
self
.
loggerMap
[
alogger
]
=
None
#
...
...
@@ -1267,7 +1264,6 @@ class Logger(Filterer):
Remove the specified handler from this logger.
"""
if
hdlr
in
self
.
handlers
:
#hdlr.close()
hdlr
.
acquire
()
try
:
self
.
handlers
.
remove
(
hdlr
)
...
...
Lib/logging/handlers.py
Dosyayı görüntüle @
609364a9
...
...
@@ -125,7 +125,6 @@ class RotatingFileHandler(BaseRotatingHandler):
sfn
=
"
%
s.
%
d"
%
(
self
.
baseFilename
,
i
)
dfn
=
"
%
s.
%
d"
%
(
self
.
baseFilename
,
i
+
1
)
if
os
.
path
.
exists
(
sfn
):
#print "%s -> %s" % (sfn, dfn)
if
os
.
path
.
exists
(
dfn
):
os
.
remove
(
dfn
)
os
.
rename
(
sfn
,
dfn
)
...
...
@@ -133,7 +132,6 @@ class RotatingFileHandler(BaseRotatingHandler):
if
os
.
path
.
exists
(
dfn
):
os
.
remove
(
dfn
)
os
.
rename
(
self
.
baseFilename
,
dfn
)
#print "%s -> %s" % (self.baseFilename, dfn)
self
.
mode
=
'w'
self
.
stream
=
self
.
_open
()
...
...
@@ -283,7 +281,6 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
t
=
int
(
time
.
time
())
if
t
>=
self
.
rolloverAt
:
return
1
#print "No need to rollover: %d, %d" % (t, self.rolloverAt)
return
0
def
getFilesToDelete
(
self
):
...
...
@@ -330,14 +327,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
os
.
remove
(
dfn
)
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
.
mode
=
'w'
self
.
stream
=
self
.
_open
()
currentTime
=
int
(
time
.
time
())
...
...
@@ -783,7 +774,7 @@ class SysLogHandler(logging.Handler):
prio
=
'<
%
d>'
%
self
.
encodePriority
(
self
.
facility
,
self
.
mapPriority
(
record
.
levelname
))
prio
=
prio
.
encode
(
'utf-8'
)
#Message is a string. Convert to bytes as required by RFC 5424
#
Message is a string. Convert to bytes as required by RFC 5424
msg
=
msg
.
encode
(
'utf-8'
)
if
codecs
:
msg
=
codecs
.
BOM_UTF8
+
msg
...
...
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