             self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
             return
         }
-        
-        self.commandDelegate!.runInBackground({
-            _ = IMFLogger(forName: name)
+
+            IMFLogger(forName: name)
             // log uncaught exceptions
             IMFLogger.captureUncaughtExceptions()
         })
     }
-    
+
     func getCapture(command: CDVInvokedUrlCommand){
         
         self.commandDelegate!.runInBackground({

    func info(command: CDVInvokedUrlCommand){
        // parms: [name, message]
        
        guard let name  = command.arguments[0] as? String else {
            let message = "Name  Parameter is Invalid."
            let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAsString: message)
            // call error callback
            self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
            return
        }
        
        guard let message  = command.arguments[1] as? String else {
            let msg = "message  Parameter is Invalid."
            let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAsString: msg)
            // call error callback
            self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
            return
        }
        
        self.commandDelegate!.runInBackground({
            
            let logger = IMFLogger(forName: name)
            logger.logWithLevel(.Info, message: message, args: CVaListPointer(_fromUnsafeMutablePointer: nil), userInfo:Dictionary<String, String>())


@objc(CDVMFPLogger) class CDVMFPLogger : CDVPlugin {
    
    let logLevelDictionary: Dictionary<String,IMFLogLevel> = [
        "TRACE"     : IMFLogLevel.Trace,
        "DEBUG"     : IMFLogLevel.Debug,
        "LOG"       : IMFLogLevel.Log,
        "INFO"      : IMFLogLevel.Info,
        "WARN"      : IMFLogLevel.Warn,
        "ERROR"     : IMFLogLevel.Error,
        "FATAL"     : IMFLogLevel.Fatal,
        "ANALYTICS" : IMFLogLevel.Analytics,
    ]

    func getInstance(command: CDVInvokedUrlCommand){
        // parms: [name]

        self.commandDelegate!.runInBackground({

        guard let name  = command.arguments[0] as? String else {
            let message = "Name  Parameter is Invalid."
            let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAsString: message)
