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
ab7b0a03
Kaydet (Commit)
ab7b0a03
authored
Eyl 03, 2016
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixes #27937: optimise code used in all logging calls.
üst
f0f1c239
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
__init__.py
Lib/logging/__init__.py
+5
-4
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
ab7b0a03
# Copyright 2001-201
5
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-201
6
by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
...
...
@@ -18,7 +18,7 @@
Logging package for Python. Based on PEP 282 and comments thereto in
comp.lang.python.
Copyright (C) 2001-201
5
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-201
6
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
...
...
@@ -129,8 +129,9 @@ def getLevelName(level):
Otherwise, the string "Level
%
s"
%
level is returned.
"""
# See Issue #22386 for the reason for this convoluted expression
return
_levelToName
.
get
(
level
,
_nameToLevel
.
get
(
level
,
(
"Level
%
s"
%
level
)))
# See Issues #22386 and #27937 for why it's this way
return
(
_levelToName
.
get
(
level
)
or
_nameToLevel
.
get
(
level
)
or
"Level
%
s"
%
level
)
def
addLevelName
(
level
,
levelName
):
"""
...
...
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