logging.handlers.BaseRotatingHandler.rotate()

rotate(source, dest)

When rotating, rotate the current log.

The default implementation calls the ‘rotator’ attribute of the handler, if it’s callable, passing the source and dest arguments to it. If the attribute isn’t callable (the default is None), the source is simply renamed to the destination.

Parameters:
  • source – The source filename. This is normally the base filename, e.g. ‘test.log’.
  • dest – The destination filename. This is normally what the source is rotated to, e.g. ‘test.log.1’.

New in version 3.3.

doc_python
2016-10-07 17:36:08
Comments
Leave a Comment

Please login to continue.