Get iOS Logs appium

I am trying to fetch the logs with appium for iOS application. But I am thrown an undefined error for the code, which was working previously with appium.

I have tried this code in 1.6.4, 1.6.5 and 1.6.5beta but in vain.

To fetch the logs code


My Desirecapabilities has

showIOSLog: "true",

The error I get:

undefined method `get_log’ for #Appium::Driver:0x007f8876165610

I am using xcode version more than 8.

Any help is greatly appreciated.