     internal var connection:(ddp:Bool, session:String?) = (false, nil)
     
     public var delegate:SwiftDDPDelegate?
-    public var logLevel = XCGLogger.LogLevel.None
-        
+    
+
+    // MARK: Settings
+    
+    /**
+    Boolean value that determines whether the
+    */
+    
+    public var allowSelfSignedSSL:Bool = false {
+        didSet{
+            guard let currentSocket = socket else { return }
+            currentSocket.allowSelfSignedSSL = allowSelfSignedSSL
+        }
+    }
+    
+    /**
+    Sets the log level. The default value is .None.
+    Possible values: .Verbose, .Debug, .Info, .Warning, .Error, .Severe, .None
+    */
+    
+    public var logLevel = XCGLogger.LogLevel.None {
+        didSet {
+            log.setup(logLevel, showLogIdentifier: true, showFunctionName: true, showThreadName: true, showLogLevel: true, showFileNames: false, showLineNumbers: true, showDate: false, writeToFile: nil, fileLogLevel: .None)
+        }
+    }
+    
     internal override init() {
         super.init()
-        setLogLevel(logLevel)
-    }
-    
-    /**
-     Creates a random String id
-     */
+    }
+    
+    /**
+    Creates a random String id
+    */
     
     public func getId() -> String {
         let numbers = Set<Character>(["0","1","2","3","4","5","6","7","8","9"])

    private var socket:WebSocket!{
        didSet{ socket.allowSelfSignedSSL = self.allowSelfSignedSSL }
    }
    public var allowSelfSignedSSL:Bool = false {
        didSet{
        guard let currentSocket = socket else { return }
        currentSocket.allowSelfSignedSSL = allowSelfSignedSSL
        }
    }
    private var server:(ping:NSDate?, pong:NSDate?) = (nil, nil)
    
    internal var resultCallbacks:[String:Completion] = [:]

        }
    }
    
    private func ping() {
        heartbeat.addOperationWithBlock() {
            self.sendMessage(["msg":"ping", "id":self.getId()])
