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
698abe75
Kaydet (Commit)
698abe75
authored
Mar 14, 2014
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #20918: Added handling for exceptions during fallback output of logging exceptions.
üst
a0b9eeb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
__init__.py
Lib/logging/__init__.py
+12
-4
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
698abe75
# Copyright 2001-201
3
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-201
4
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
3
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-201
4
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
To use, simply 'import logging' and log away!
"""
"""
...
@@ -42,6 +42,7 @@ except ImportError: #pragma: no cover
...
@@ -42,6 +42,7 @@ except ImportError: #pragma: no cover
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__author__
=
"Vinay Sajip <vinay_sajip@red-dove.com>"
__status__
=
"production"
__status__
=
"production"
# The following module attributes are no longer updated.
__version__
=
"0.5.1.2"
__version__
=
"0.5.1.2"
__date__
=
"07 February 2010"
__date__
=
"07 February 2010"
...
@@ -902,8 +903,15 @@ class Handler(Filterer):
...
@@ -902,8 +903,15 @@ class Handler(Filterer):
sys
.
stderr
.
write
(
'Logged from file
%
s, line
%
s
\n
'
%
(
sys
.
stderr
.
write
(
'Logged from file
%
s, line
%
s
\n
'
%
(
record
.
filename
,
record
.
lineno
))
record
.
filename
,
record
.
lineno
))
# Issue 18671: output logging message and arguments
# Issue 18671: output logging message and arguments
sys
.
stderr
.
write
(
'Message:
%
r
\n
'
try
:
'Arguments:
%
s
\n
'
%
(
record
.
msg
,
record
.
args
))
sys
.
stderr
.
write
(
'Message:
%
r
\n
'
'Arguments:
%
s
\n
'
%
(
record
.
msg
,
record
.
args
))
except
Exception
:
sys
.
stderr
.
write
(
'Unable to print the message and arguments'
' - possible formatting error.
\n
Use the'
' traceback above to help find the error.
\n
'
)
except
OSError
:
#pragma: no cover
except
OSError
:
#pragma: no cover
pass
# see issue 5971
pass
# see issue 5971
finally
:
finally
:
...
...
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