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
4d7ad632
Kaydet (Commit)
4d7ad632
authored
Ara 14, 2006
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Stripped whitespace from comma-separated values read from config file
üst
9e2423ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
config.py
Lib/logging/config.py
+5
-4
No files found.
Lib/logging/config.py
Dosyayı görüntüle @
4d7ad632
...
...
@@ -110,7 +110,7 @@ def _create_formatters(cp):
flist
=
string
.
split
(
flist
,
","
)
formatters
=
{}
for
form
in
flist
:
sectname
=
"formatter_
%
s"
%
form
sectname
=
"formatter_
%
s"
%
string
.
strip
(
form
)
opts
=
cp
.
options
(
sectname
)
if
"format"
in
opts
:
fs
=
cp
.
get
(
sectname
,
"format"
,
1
)
...
...
@@ -139,7 +139,7 @@ def _install_handlers(cp, formatters):
handlers
=
{}
fixups
=
[]
#for inter-handler references
for
hand
in
hlist
:
sectname
=
"handler_
%
s"
%
hand
sectname
=
"handler_
%
s"
%
string
.
strip
(
hand
)
klass
=
cp
.
get
(
sectname
,
"class"
)
opts
=
cp
.
options
(
sectname
)
if
"formatter"
in
opts
:
...
...
@@ -176,6 +176,7 @@ def _install_loggers(cp, handlers):
# configure the root first
llist
=
cp
.
get
(
"loggers"
,
"keys"
)
llist
=
string
.
split
(
llist
,
","
)
llist
=
map
(
lambda
x
:
string
.
strip
(
x
),
llist
)
llist
.
remove
(
"root"
)
sectname
=
"logger_root"
root
=
logging
.
root
...
...
@@ -190,7 +191,7 @@ def _install_loggers(cp, handlers):
if
len
(
hlist
):
hlist
=
string
.
split
(
hlist
,
","
)
for
hand
in
hlist
:
log
.
addHandler
(
handlers
[
hand
])
log
.
addHandler
(
handlers
[
string
.
strip
(
hand
)
])
#and now the others...
#we don't want to lose the existing loggers,
...
...
@@ -225,7 +226,7 @@ def _install_loggers(cp, handlers):
if
len
(
hlist
):
hlist
=
string
.
split
(
hlist
,
","
)
for
hand
in
hlist
:
logger
.
addHandler
(
handlers
[
hand
])
logger
.
addHandler
(
handlers
[
string
.
strip
(
hand
)
])
#Disable any old loggers. There's no point deleting
#them as other threads may continue to hold references
...
...
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