 
 extension Logger {
 
-    static func appleError(_ message: CustomStringConvertible,
+    static func appleError(_ message: @autoclosure () -> CustomStringConvertible,
                            fileName: String = #fileID,
                            functionName: String = #function,
                            line: UInt = #line) {
-        log(level: .error, intent: .appleError, message: message.description,
-            fileName: fileName,
-            functionName: functionName,
-            line: line)
+        self.log(level: .error, intent: .appleError, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func appleWarning(_ message: CustomStringConvertible,
+    static func appleWarning(_ message: @autoclosure () -> CustomStringConvertible,
                              fileName: String = #fileID,
                              functionName: String = #function,
                              line: UInt = #line) {
-        log(level: .warn, intent: .appleError, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .warn, intent: .appleError, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func purchase(_ message: CustomStringConvertible,
+    static func purchase(_ message: @autoclosure () -> CustomStringConvertible,
                          fileName: String = #fileID,
                          functionName: String = #function,
                          line: UInt = #line) {
-        log(level: .info, intent: .purchase, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .info, intent: .purchase, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func rcPurchaseSuccess(_ message: CustomStringConvertible,
+    static func rcPurchaseSuccess(_ message: @autoclosure () -> CustomStringConvertible,
                                   fileName: String = #fileID,
                                   functionName: String = #function,
                                   line: UInt = #line) {
-        log(level: .info, intent: .rcPurchaseSuccess, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .info, intent: .rcPurchaseSuccess, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func rcPurchaseError(_ message: CustomStringConvertible,
+    static func rcPurchaseError(_ message: @autoclosure () -> CustomStringConvertible,
                                 fileName: String = #fileID,
                                 functionName: String = #function,
                                 line: UInt = #line) {
-        log(level: .error, intent: .purchase, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .error, intent: .purchase, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func rcSuccess(_ message: CustomStringConvertible,
+    static func rcSuccess(_ message: @autoclosure () -> CustomStringConvertible,
                           fileName: String = #fileID,
                           functionName: String = #function,
                           line: UInt = #line) {
-        log(level: .debug, intent: .rcSuccess, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .debug, intent: .rcSuccess, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
-    static func user(_ message: CustomStringConvertible,
+    static func user(_ message: @autoclosure () -> CustomStringConvertible,
                      fileName: String? = #fileID,
                      functionName: String? = #function,
                      line: UInt = #line) {
-        log(level: .debug, intent: .user, message: message.description,
-            fileName: fileName, functionName: functionName, line: line)
+        self.log(level: .debug, intent: .user, message: message().description,
+                 fileName: fileName, functionName: functionName, line: line)
     }
 
 }


    internal static let frameworkDescription = "Purchases"

    static func debug(_ message: CustomStringConvertible,
                      fileName: String? = #fileID,
                      functionName: String? = #function,
                      line: UInt = #line) {
        log(level: .debug, intent: .info, message: message.description,
            fileName: fileName, functionName: functionName, line: line)
    }

    static func info(_ message: CustomStringConvertible,
                     fileName: String? = #fileID,
                     functionName: String? = #function,
                     line: UInt = #line) {
        log(level: .info, intent: .info, message: message.description,
            fileName: fileName, functionName: functionName, line: line)
    }

    static func warn(_ message: CustomStringConvertible,
                     fileName: String? = #fileID,
                     functionName: String? = #function,
                     line: UInt = #line) {
        log(level: .warn, intent: .warning, message: message.description,
            fileName: fileName, functionName: functionName, line: line)
    }

    static func error(_ message: CustomStringConvertible,
                      fileName: String = #fileID,
                      functionName: String = #function,
                      line: UInt = #line) {
        log(level: .error, intent: .rcError, message: message.description,
            fileName: fileName, functionName: functionName, line: line)
    }


private extension Logger {

    static func log(level: LogLevel,
                    message: @autoclosure () -> String,
                    fileName: String? = #fileID,
                    functionName: String? = #function,
                    line: UInt = #line) {
        guard self.logLevel.rawValue <= level.rawValue else { return }

        Self.logHandler(level, message(), fileName, functionName, line)
    }

    static func log(level: LogLevel,
                    intent: LogIntent,
                    message: @autoclosure () -> String,
                    fileName: String? = #fileID,
                    functionName: String? = #function,
                    line: UInt = #line) {
        Self.log(level: level,
                 message: "\(intent.prefix) \(message())",
                 fileName: fileName,
                 functionName: functionName,
                 line: line)
    }

}
