LogRotation class
Utility class for log rotation functionality
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
formatBytes(
int bytes) → String - Format bytes to human readable string
-
generateRotatedFilename(
String originalFilename, {DateTime? timestamp, String? suffix}) → String - Generate rotated filename with timestamp
-
isSameDay(
DateTime a, DateTime b) → bool - Check if two DateTime objects are on the same day
-
nextDailyRotation(
[DateTime? from]) → DateTime - Calculate next rotation time for daily rotation
-
shouldRotateBySize(
int currentSize, int maxSize) → bool - Check if a file should be rotated based on size
-
shouldRotateDaily(
DateTime fileDate, [DateTime? now]) → bool - Check if a file should be rotated based on date