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
edde492f
Kaydet (Commit)
edde492f
authored
Kas 11, 2004
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor grammatical errors fixed
üst
af305b1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
liblogging.tex
Doc/lib/liblogging.tex
+6
-7
No files found.
Doc/lib/liblogging.tex
Dosyayı görüntüle @
edde492f
...
@@ -79,7 +79,8 @@ files.
...
@@ -79,7 +79,8 @@ files.
\item
\class
{
BaseRotatingHandler
}
is tha base class for handlers that
\item
\class
{
BaseRotatingHandler
}
is tha base class for handlers that
rotate log files at a certain point. It is not meant to be instantiated
rotate log files at a certain point. It is not meant to be instantiated
directly. Instead, use RotatingFileHandler or TimedRotatingFileHandler.
directly. Instead, use
\class
{
RotatingFileHandler
}
or
\class
{
TimedRotatingFileHandler
}
.
\item
\class
{
RotatingFileHandler
}
instances send error messages to disk
\item
\class
{
RotatingFileHandler
}
instances send error messages to disk
files, with support for maximum log file sizes and log file rotation.
files, with support for maximum log file sizes and log file rotation.
...
@@ -703,8 +704,7 @@ class LogRecordSocketReceiver(SocketServer.ThreadingTCPServer):
...
@@ -703,8 +704,7 @@ class LogRecordSocketReceiver(SocketServer.ThreadingTCPServer):
def main():
def main():
logging.basicConfig(
logging.basicConfig(
format="
%(relativeCreated)5d %(name)-15s %(levelname)-8s %(message)s",
format="
%(relativeCreated)5d %(name)-15s %(levelname)-8s %(message)s")
datefmt="
%H:%M:%S")
tcpserver = LogRecordSocketReceiver()
tcpserver = LogRecordSocketReceiver()
print "About to start TCP server..."
print "About to start TCP server..."
tcpserver.serve
_
until
_
stopped()
tcpserver.serve
_
until
_
stopped()
...
@@ -713,9 +713,8 @@ if __name__ == "__main__":
...
@@ -713,9 +713,8 @@ if __name__ == "__main__":
main()
main()
\end{verbatim}
\end{verbatim}
If you first run the server, and then the client. On the client side, nothing
First run the server, and then the client. On the client side, nothing is
is printed on the client console; on the server side, you should see something
printed on the console; on the server side, you should see something like:
like this:
\begin{verbatim}
\begin{verbatim}
About to start TCP server...
About to start TCP server...
...
@@ -910,7 +909,7 @@ at certain timed intervals.
...
@@ -910,7 +909,7 @@ at certain timed intervals.
Returns a new instance of the
\class
{
TimedRotatingFileHandler
}
class. The
Returns a new instance of the
\class
{
TimedRotatingFileHandler
}
class. The
specified file is opened and used as the stream for logging. On rotating
specified file is opened and used as the stream for logging. On rotating
it also sets the filename suffix. Rotating happens based on the product
it also sets the filename suffix. Rotating happens based on the product
of
\var
{
when
}
and
\var
{
interval
}
.
of
\var
{
when
}
and
\var
{
interval
}
.
You can use the
\var
{
when
}
to specify the type of
\var
{
interval
}
. The
You can use the
\var
{
when
}
to specify the type of
\var
{
interval
}
. The
list of possible values is, note that they are not case sensitive:
list of possible values is, note that they are not case sensitive:
...
...
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