 
 import Foundation
 
+fileprivate let AutoRotatingFileDefaultMaxFileSize: UInt64 = 1_048_576
+fileprivate let AutoRotatingFileDefaultMaxTimeInterval: TimeInterval = 600
+
 // MARK: - AutoRotatingFileDestination
 /// A destination that outputs log details to files in a log folder, with auto-rotate options (by size or by time)
 open class AutoRotatingFileDestination: FileDestination {
     // MARK: - Properties
     /// Option: desired maximum size of a log file, if 0, no maximum (log files may exceed this, it's a guideline only)
-    open var targetMaxFileSize: UInt64 = 1_048_576 {
+    open var targetMaxFileSize: UInt64 = AutoRotatingFileDefaultMaxFileSize {
         didSet {
             if targetMaxFileSize < 1 {
                 targetMaxFileSize = .max

        // File Size
        guard currentLogFileSize < targetMaxFileSize else { return true }

        // Time Interval
        guard Date().timeIntervalSince1970 - currentLogStartTimeInterval < targetMaxTimeInterval else { return true }

        return false

    }

    /// Option: desired maximum time in seconds stored in a log file, if 0, no maximum (log files may exceed this, it's a guideline only)
    open var targetMaxTimeInterval: TimeInterval = AutoRotatingFileDefaultMaxTimeInterval {
        didSet {
            if targetMaxTimeInterval < 1 {
                targetMaxTimeInterval = 0
            }
        }
    }
