|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/22697/root/usr/lib64/python2.4/logging/ |
Upload File : |
m
=5Dc @ s d Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k
Z
y
d k Z Wn e j
o
d Z n Xd Z d Z d Z d Z d Z d e i f d YZ d e f d
YZ d e f d YZ d
e i f d YZ d e f d YZ d e i f d YZ d e i f d YZ d e i f d YZ d e i f d YZ d e i f d YZ d e f d YZ d S( s
Additional handlers for the logging package for Python. The core package is
based on PEP 282 and comments thereto in comp.lang.python, and influenced by
Apache's log4j system.
Should work under Python versions >= 1.5.2, except that source line
information is not available unless 'sys._getframe()' is.
Copyright (C) 2001-2004 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
Ni<# i=# i># i?# i t BaseRotatingHandlerc B s# t Z d Z e d Z d Z RS( s
Base class for handlers that rotate log files at a certain point.
Not meant to be instantiated directly. Instead, use RotatingFileHandler
or TimedRotatingFileHandler.
c C sF t d j o
d } n t i i | | | | | | _ | | _ d S( sA
Use the specified filename for streamed logging
N( t codecst Nonet encodingt loggingt FileHandlert __init__t selft filenamet mode( R R R R ( ( t( /usr/lib64/python2.4/logging/handlers.pyR 5 s
c C sk y5 | i | o | i n t i i | | Wn/ t t f j
o
n | i | n Xd S( s
Emit a record.
Output the record to the file, catering for rollover as described
in doRollover().
N(
R t shouldRollovert recordt
doRolloverR R t emitt KeyboardInterruptt
SystemExitt handleError( R R ( ( R
R ? s ( t __name__t
__module__t __doc__R R R ( ( ( R
R / s
t RotatingFileHandlerc B s5 t Z d Z d d d e d Z d Z d Z RS( s
Handler for logging to a set of files, which switches from one file
to the next when the current file reaches a certain size.
t ai c C sC | d j o
d } n t i | | | | | | _ | | _ d S( s
Open the specified file and use it as the stream for logging.
By default, the file grows indefinitely. You can specify particular
values of maxBytes and backupCount to allow the file to rollover at
a predetermined size.
Rollover occurs whenever the current log file is nearly maxBytes in
length. If backupCount is >= 1, the system will successively create
new files with the same pathname as the base file, but with extensions
".1", ".2" etc. appended to it. For example, with a backupCount of 5
and a base file name of "app.log", you would get "app.log",
"app.log.1", "app.log.2", ... through to "app.log.5". The file being
written to is always "app.log" - when it gets filled up, it is closed
and renamed to "app.log.1", and if files "app.log.1", "app.log.2" etc.
exist, then they are renamed to "app.log.2", "app.log.3" etc.
respectively.
If maxBytes is zero, rollover never occurs.
i R N( t maxBytesR R R R R R t backupCount( R R R R R R ( ( R
R T s
c C sy | i i | i d j ox t | i d d d D]{ } d | i | f } d | i | d f } t i
i | o8 t i
i | o t i | n t i
| | q7 q7 W| i d } t i
i | o t i | n y t i
| i | Wq4t t f j
o
q4| i t q4Xn | i o"