smartinspectpython.sifilerotater
Module: sifilerotater.py
Revision History
Date | Version | Description |
---|---|---|
2023/05/30 | 3.0.0.0 | Initial Version. |
Responsible for the log file rotate management as used by the SIFileProtocol class.
This class implements a flexible log file rotate management system. For a detailed description of how to use this class, please refer to the documentation of the Initialize(DateTime) and Update(DateTime) methods and the Mode property.
Threadsafety:
This class is not guaranteed to be thread-safe.
Gets the FileRotate property value.
Represents the SIFileRotate mode of this SIFileRotater object.
Always call the Initialize method after changing this property to reinitialize this SIFileRotater object. For a complete list of available property values, please refer to the documentation of the SIFileRotate enum.
Initializes this object with a user-supplied timestamp.
Arguments:
- now (datetime): The user-specified timestamp to use to initialize this object.
Always call this method after creating a new SIFileRotater object and before calling the Update method the first time. For additional information please refer to the Update method.
Determines the amount of time between the specified date and when the next file rotation will take place.
Arguments:
- now (datetime): The date the File Rotation event is calculated from.
Returns:
The amount of time between the specified date and when the next file rotation will take place.
Updates the date of this object and returns whether the rotate state has changed since the last call to this method or to Initialize.
Arguments:
- now (datetime): The timestamp to update this object.
Returns:
True if the rotate state has changed since the last call to this method or to Initialize and false otherwise.
This method updates the internal date of this SIFileRotater object and returns whether the rotate state has changed since the last call to this method or to Initialize. Before calling this method, always call the Initialize method.