webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
compat_logging.handlers.RotatingFileHandler Class Reference
Inheritance diagram for compat_logging.handlers.RotatingFileHandler:

Public Member Functions

def __init__ (self, filename, mode="a", maxBytes=0, backupCount=0)
 
def doRollover (self)
 
def emit (self, record)
 

Public Attributes

 maxBytes
 
 backupCount
 
 mode
 
 stream
 

Constructor & Destructor Documentation

◆ __init__()

def compat_logging.handlers.RotatingFileHandler.__init__ (   self,
  filename,
  mode = "a",
  maxBytes = 0,
  backupCount = 0 
)
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.

Member Function Documentation

◆ doRollover()

def compat_logging.handlers.RotatingFileHandler.doRollover (   self)
Do a rollover, as described in __init__().

◆ emit()

def compat_logging.handlers.RotatingFileHandler.emit (   self,
  record 
)
Emit a record.

Output the record to the file, catering for rollover as described
in doRollover().

Member Data Documentation

◆ backupCount

compat_logging.handlers.RotatingFileHandler.backupCount

◆ maxBytes

compat_logging.handlers.RotatingFileHandler.maxBytes

◆ mode

compat_logging.handlers.RotatingFileHandler.mode

◆ stream

compat_logging.handlers.RotatingFileHandler.stream

The documentation for this class was generated from the following file: