Android console logs
Appelium's activity log records what happened in the application before a crash, non-fatal error or bug report was captured. Unlike Android Logcat, it follows the report to the Appelium Dashboard, so developers can investigate an issue without access to the customer's device.
Start AppeliumFeedback once from your Application or app startup code. Then use the AppeliumFeedback.Log functions anywhere in the app. The calls are in-process and do not require a Context or a network request.
Log levels
Choose the level that describes the event:
| Method | Level | Typical use |
|---|---|---|
v |
Verbose | Detailed development or lifecycle information |
d |
Debug | Values and branches useful while diagnosing a flow |
i |
Info | Expected events such as a completed login or loaded screen |
w |
Warning | Recoverable problems that need investigation |
e |
Error | A failed operation, optionally with its exception |
a |
Assert | A violated assumption or state that should not occur |
1 2 3 4 5 6 | |
The optional tag is stored as the log's domain. Use stable, short values such as Auth, Checkout or Networking; do not create a new tag for every user or request ID.
Attach an exception
Every level accepts an optional Throwable. Appelium appends its formatted stack trace to the message so the exception and the application events leading up to it remain in one timeline.
try {
refreshAccessToken()
} catch (exception: IOException) {
AppeliumFeedback.Log.e(
message = "Unable to refresh the access token",
tag = "Auth",
throwable = exception
)
}
For a non-fatal error that should be reported immediately rather than waiting for a bug report, see Error Reports.
How long are logs retained?
The default retention is 60 seconds and does not impose a count limit. Logs older than the configured lifetime are removed at export time. You can change both limits when starting the SDK:
AppeliumFeedback.start(
apiKey = "YOUR_API_KEY",
application = this,
logsRetention = LogsRetentionConfiguration(
maxLifetimeMs = 120_000,
maxCount = 1_000
)
)
Use the smallest lifetime and count that still capture the failure window. Long retention increases the amount of data bundled with a report and retained locally while the process is inactive.
Privacy and useful context
Console logs are uploaded as part of the reports you enable. Do not log passwords, access or refresh tokens, payment-card data, private keys, raw authorization headers, or unnecessary user-entered text. Prefer identifiers and state transitions that let a developer reproduce the problem:
AppeliumFeedback.Log.i(message = "Checkout state changed to payment_pending", tag = "Checkout")
Network request and response data has its own integration and obfuscation controls; see Network Logs and Monitoring instead of duplicating payloads in console messages.
Troubleshooting
- No logs in a report: verify that
AppeliumFeedback.startran before the flow you are investigating and that the report type is enabled. - Only the newest events appear: increase
maxLifetimeMsormaxCountinLogsRetentionConfiguration. - An exception is missing: pass it through the
throwableargument; a message built withexception.messagealone does not include the stack trace. - Logs are difficult to filter: use a stable
tagper subsystem and choose a severity consistently across the application.