         
         if let cookies = cookies {
             for cookie in cookies {
-            
                 cookieStorage.deleteCookie(cookie as NSHTTPCookie)
             }
         }

import Foundation

public extension NSURL {

    func logCookies() {
        
        var cookiesLog = "Cookies for url: \(self)\n"
    
        if let cookies = NSHTTPCookieStorage.sharedHTTPCookieStorage().cookiesForURL(self) as? [NSHTTPCookie] {
            
            for cookie in cookies {

                cookiesLog += "Name: '\(cookie.name)'; Value: '\(cookie.value)'\n"
            }
        }
        
        NSLog(cookiesLog)
    }
    
