Looking for iOS application logs

Hi all,

Can anyone please help me on how to get the iOS application logs via Appium (through a flag as a command line argument…or whether in the code somewhere?)
I know we can get the device logs by putting a --log …but how can we can use NSLog feature to get the app logs? I would only probably need it in case of a failed scenario.

Thanks.

hi,

do following with appium server:

  • set log level to “DEBUG”
  • add “–show-ios-log” + “–show-sim-log” keys

Is that for device logs or app logs? because I was looking for app logs. I thought there is something like a NSLog that we could use…in any case I am launching appium from command line…so can you give me the exact parameter flags I would need to type?

Thanks @Aleksei

with latest Appium it is now goes to driver capability!

showIOSLog = Whether to show any logs captured from a device in the appium logs. Default false

so thats for the device logs right? What about app logs? as in…the app in the iOS device?

Thanks @Aleksei

try. i guess should be your logs. i used it before with “–show-ios-log” + “–show-sim-log” with 1.4.X appium without problem.

Easiest way I’ve found when running appium from the command line is to just add the -g parameter, like so:
g ~/appium_server.log
Then you know exactly where it is.

Have you been able to get the app logs?

PS

NO, guys, OS logs != App logs. Not even close

Also, in my case I could use performance logs, but it looks like they’re not implemented for apps. Only for Safari. Unfortunately.

I played quite a bit with Appium and it’s various logs. Neither of them has app logs, which sucks. I think I’ll have to access the simulator or the IDE directly to get them.

It’s weird though. I would totally expect Appium to handle it.

Appium uses idevicesyslog utility to gather logs from the device. Officially Apple does not provide any APIs for that at all. In our automated tests we share logs from the app via the pasteboard %)

@Styris Did you figure it out?
it just doesn’t make sense that there is no way to get the application’s log.