Package logging :: Module handlers :: Class BaseRotatingHandler
[show private | hide private]
[frames | no frames]

Class BaseRotatingHandler

Filterer --+            
           |            
     Handler --+        
               |        
   StreamHandler --+    
                   |    
         FileHandler --+
                       |
                      BaseRotatingHandler

Known Subclasses:
RotatingFileHandler, TimedRotatingFileHandler

Base class for handlers that rotate log files at a certain point. Not meant to be instantiated directly. Instead, use RotatingFileHandler or TimedRotatingFileHandler.
Method Summary
  __init__(self, filename, mode, encoding)
Use the specified filename for streamed logging
  emit(self, record)
Emit a record.
    Inherited from FileHandler
  close(self)
Closes the stream.
    Inherited from StreamHandler
  flush(self)
Flushes the stream.
    Inherited from Handler
  acquire(self)
Acquire the I/O thread lock.
  createLock(self)
Acquire a thread lock for serializing access to the underlying I/O.
  format(self, record)
Format the specified record.
  handle(self, record)
Conditionally emit the specified logging record.
  handleError(self, record)
Handle errors which occur during an emit() call.
  release(self)
Release the I/O thread lock.
  setFormatter(self, fmt)
Set the formatter for this handler.
  setLevel(self, level)
Set the logging level of this handler.
    Inherited from Filterer
  addFilter(self, filter)
Add the specified filter to this handler.
  filter(self, record)
Determine if a record is loggable by consulting all the filters.
  removeFilter(self, filter)
Remove the specified filter from this handler.

Method Details

__init__(self, filename, mode, encoding=None)
(Constructor)

Use the specified filename for streamed logging
Overrides:
logging.FileHandler.__init__

emit(self, record)

Emit a record.

Output the record to the file, catering for rollover as described in doRollover().
Overrides:
logging.StreamHandler.emit