Perfecto Command
mobile:device:log
Purpose
Retrieves the latest tail number of lines from the operating system log on the device. The device log contains valuable data that can help understand execution problems.
Parameters
| Name | Type | Possible Values | Description | 
|---|---|---|---|
| tail | Integer | The number of lines to retrieve from the log. This number of lines will be retrieved from the end of the log Effective values are in the range of 0-10000. | 
Return Value
Device log returned as String
Exceptions
None
Examples
Copy
                                                
                                                    
                                                
                                            
                                            Java sample
     Map<String, Object> pars = new HashMap<>();
     pars.put("tail", 25);
     String reStr = (String) driver.executeScript("mobile:device:log", pars); Copy
                                                
                                                    
                                                
                                            
                                        C# sample
     Dictionary<String, Object> pars = new Dictionary<String, Object>();
     pars.Add("tail", 25);
     String reStr = (String) driver.ExecuteScript("mobile:device:log", pars);