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
c33a0cc6
Kaydet (Commit)
c33a0cc6
authored
Kas 01, 2014
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Brought excluded code into the scope of a try block in SysLogHandler.emit().
üst
8083cd6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
handlers.py
Lib/logging/handlers.py
+14
-14
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
c33a0cc6
...
...
@@ -879,21 +879,21 @@ class SysLogHandler(logging.Handler):
The record is formatted, and then sent to the syslog server. If
exception information is present, it is NOT sent to the server.
"""
msg
=
self
.
format
(
record
)
if
self
.
ident
:
msg
=
self
.
ident
+
msg
if
self
.
append_nul
:
msg
+=
'
\000
'
# We need to convert record level to lowercase, maybe this will
# change in the future.
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
msg
=
msg
.
encode
(
'utf-8'
)
msg
=
prio
+
msg
try
:
msg
=
self
.
format
(
record
)
if
self
.
ident
:
msg
=
self
.
ident
+
msg
if
self
.
append_nul
:
msg
+=
'
\000
'
# We need to convert record level to lowercase, maybe this will
# change in the future.
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
msg
=
msg
.
encode
(
'utf-8'
)
msg
=
prio
+
msg
if
self
.
unixsocket
:
try
:
self
.
socket
.
send
(
msg
)
...
...
Misc/NEWS
Dosyayı görüntüle @
c33a0cc6
...
...
@@ -33,6 +33,9 @@ Core and Builtins
Library
-------
- Issue #22776: Brought excluded code into the scope of a try block in
SysLogHandler.emit().
- Issue #22665: Add missing get_terminal_size and SameFileError to
shutil.__all__.
...
...
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