Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

Device logs

Device logs are system logs specific to your application generated by iOS or Android. They can help you access your application logs and are especially helpful if the application under test crashes during test execution.

Device logs are available on the BrowserStack dashboard for 60 days. These logs will be deleted after 60 days from the day they were generated.

Device logs are enabled by default. To disable device logs, use the capability as shown below.

If you are using BrowserStack SDK, you can set the following capability within the browserstack.yml file:

Capability Description Value
deviceLogs Capture device logs for your test. true, false
Default: true
browserstack.yml
Copy icon Copy

BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.

Use the following code snippet to set the Device logs capability to true:

Capability Description Value
deviceLogs Capture device logs for your test. true, false
Default: true

Example :

DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("deviceLogs", "false");
var capabilities = {
	'bstack:options' : {
		"deviceLogs" : "false",
	},
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("deviceLogs", "false");
$caps = array(
    'bstack:options' => array(
        "deviceLogs" => "false",
    ),
)
desired_cap = {
	'bstack:options' : {
		"deviceLogs" : "false",
	},
}
capabilities = {
    'bstack:options' => {
        "deviceLogs" => "false",
    },
}
Capability Description Value
browserstack.deviceLogs Capture device logs for your test. true, false
Default: true

Example :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.deviceLogs", "false");
var capabilities = {
	'browserstack.deviceLogs': 'false'
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.deviceLogs", "false");
$caps = array(
    "browserstack.deviceLogs" => "false"
)
desired_cap = {
	"browserstack.deviceLogs" : "false"
}
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["browserstack.deviceLogs"] = "false"

Access device logs from the dashboard:

The device logs can be viewed from the test sessions details page on the App Automate Dashboard

App Automate Dashboard Device Logs

You can also view or download device logs using Other Logs > Device > View raw logs or Download logs:

Raw Device Logs

Access device logs using REST API:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/builds/<build-id>/sessions/<session-id>/devicelogs"

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle