Package gavo :: Package protocols :: Module gavolog :: Class RotatingFileHandler
[frames] | no frames]

Class RotatingFileHandler

source code

          object --+                        
                   |                        
    logging.Filterer --+                    
                       |                    
         logging.Handler --+                
                           |                
       logging.StreamHandler --+            
                               |            
             logging.FileHandler --+        
                                   |        
logging.handlers.BaseRotatingHandler --+    
                                       |    
    logging.handlers.RotatingFileHandler --+
                                           |
                                          RotatingFileHandler

logging.handler.RotatingFile with forced group support.

Instance Methods
 
__init__(self, *args, **kwargs)
Open the specified file and use it as the stream for logging.
source code
 
doRollover(self)
Do a rollover, as described in __init__().
source code

Inherited from logging.handlers.RotatingFileHandler: shouldRollover

Inherited from logging.handlers.BaseRotatingHandler: emit

Inherited from logging.FileHandler: close

Inherited from logging.StreamHandler: flush

Inherited from logging.Handler: acquire, createLock, format, get_name, handle, handleError, release, setFormatter, setLevel, set_name

Inherited from logging.Filterer: addFilter, filter, removeFilter

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from logging.Handler: name

Inherited from object: __class__

Method Details

__init__(self, *args, **kwargs)
(Constructor)

source code 

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.

Overrides: object.__init__
(inherited documentation)

doRollover(self)

source code 

Do a rollover, as described in __init__().

Overrides: logging.handlers.RotatingFileHandler.doRollover
(inherited documentation)