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
b1e4bf9d
Kaydet (Commit)
b1e4bf9d
authored
Ara 03, 2002
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #647387: corrections to the logging section by Vinay Sanjip
üst
9d427007
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+8
-6
No files found.
Doc/whatsnew/whatsnew23.tex
Dosyayı görüntüle @
b1e4bf9d
...
@@ -433,8 +433,8 @@ instances fall under the \samp{server} \class{Logger} in the
...
@@ -433,8 +433,8 @@ instances fall under the \samp{server} \class{Logger} in the
hierarchy. This means that if you turn up the verbosity for
hierarchy. This means that if you turn up the verbosity for
\samp
{
server
}
or direct
\samp
{
server
}
messages to a different handler,
\samp
{
server
}
or direct
\samp
{
server
}
messages to a different handler,
the changes will also apply to records logged to
\samp
{
server.auth
}
the changes will also apply to records logged to
\samp
{
server.auth
}
and
\samp
{
server.network
}
. There's also a root
\class
{
Logger
}
with
and
\samp
{
server.network
}
. There's also a root
\class
{
Logger
}
that's
the
name
\samp
{
root
}
that's the
parent of all other loggers.
the parent of all other loggers.
For simple uses, the
\module
{
logging
}
package contains some
For simple uses, the
\module
{
logging
}
package contains some
convenience functions that always use the root log:
convenience functions that always use the root log:
...
@@ -444,7 +444,7 @@ import logging
...
@@ -444,7 +444,7 @@ import logging
logging.debug('Debugging information')
logging.debug('Debugging information')
logging.info('Informational message')
logging.info('Informational message')
logging.warn('Warning:
config file
%s not found', 'server.conf')
logging.warn('Warning:config file
%s not found', 'server.conf')
logging.error('Error occurred')
logging.error('Error occurred')
logging.critical('Critical error -- shutting down')
logging.critical('Critical error -- shutting down')
\end{verbatim}
\end{verbatim}
...
@@ -452,7 +452,7 @@ logging.critical('Critical error -- shutting down')
...
@@ -452,7 +452,7 @@ logging.critical('Critical error -- shutting down')
This produces the following output:
This produces the following output:
\begin{verbatim}
\begin{verbatim}
WARN:root:Warning:
config file
not found
WARN:root:Warning:
config file server.conf
not found
ERROR:root:Error occurred
ERROR:root:Error occurred
CRITICAL:root:Critical error -- shutting down
CRITICAL:root:Critical error -- shutting down
\end{verbatim}
\end{verbatim}
...
@@ -492,7 +492,9 @@ ZeroDivisionError: integer division or modulo by zero
...
@@ -492,7 +492,9 @@ ZeroDivisionError: integer division or modulo by zero
Slightly more advanced programs will use a logger other than the root
Slightly more advanced programs will use a logger other than the root
logger. The
\function
{
getLogger(
\var
{
name
}
)
}
is used to get a
logger. The
\function
{
getLogger(
\var
{
name
}
)
}
is used to get a
particular log, creating it if it doesn't exist yet.
particular log, creating it if it doesn't exist yet;
\function
{
getLogger(None)
}
returns the root logger.
\begin{verbatim}
\begin{verbatim}
log = logging.getLogger('server')
log = logging.getLogger('server')
...
@@ -1710,6 +1712,6 @@ suggestions, corrections and assistance with various drafts of this
...
@@ -1710,6 +1712,6 @@ suggestions, corrections and assistance with various drafts of this
article: Simon Brunning, Michael Chermside, Scott David Daniels,
article: Simon Brunning, Michael Chermside, Scott David Daniels,
Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von
Fred~L. Drake, Jr., Michael Hudson, Detlef Lannert, Martin von
L
\"
owis, Andrew MacIntyre, Lalo Martins, Gustavo Niemeyer, Neal
L
\"
owis, Andrew MacIntyre, Lalo Martins, Gustavo Niemeyer, Neal
Norwitz, Chris Reedy, Neil Schemenauer, Jason Tishler.
Norwitz, Chris Reedy,
Vinay Sajip,
Neil Schemenauer, Jason Tishler.
\end
{
document
}
\end
{
document
}
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