View Android Logcat output

Debug Android applications by viewing the log of the device or emulator that they run on. The log contains the messages of your application, Android services, and the system. If the application crashes, the log also contains the stack trace.

Your application logs messages with qDebug() and the other Qt logging functions. By default, Qt uses the name of the logging category as the tag of a message, or default if the message has no category.

Logcat tab in Application Output

View Logcat output

To view the log of a device:

  1. Connect the device and enable USB debugging on it, or start an emulator.
  2. Go to Tools > Android > Logcat, and select the device.

The log opens in a tab in Application Output. Each device has its own tab. To see the SDK level and serial number of the device, hover over the tab.

When you run an application on a device, Qt Creator opens the tab for you and enters package:mine in the filter field to show only the messages of that application.

Read the log

By default, each line shows the level, tag, and process ID, followed by the message:

 D/default ( 4521): Brewing espresso

In the Standard view mode, the same line shows the date and time, tag, package name, and level in columns:

 2026-10-06 12:32:41.512 default   io.qt.coffeemachine   D  Brewing espresso

Qt Creator reads the log while the tab is visible or while an application that you started from Qt Creator is running. Between the log messages, Qt Creator adds status messages framed by asterisks:

 **** Phone_API_36 (emulator-5554) - disconnected ****

Status messages report when the device disconnects or reconnects, when a new run stops an earlier one, and when output was skipped while the tab was hidden. The filter does not hide them.

Change the layout

To select what each line shows, go to Preferences > Build & Run > Application Output, and set View mode in the Android Logcat group. For Standard, select the columns to show. The settings apply to all Logcat tabs.

Application Output tab in Build & Run preferences

Filter messages

To show only the messages that you are interested in, enter a query in the filter field of the Application Output view. Each tab has its own filter.

A query consists of terms separated by spaces. A message is shown when it matches all the terms. The matching is not case sensitive. A term is either plain text or one of the keys from the following table with a value.

TermShows messages that
textContain text anywhere in the line, including the tag and the package name.
tag:nameHave a tag that contains name.
package:nameCome from an application that has name in its package name.
package:mineCome from your application, including its other processes. This is the application that you last ran on the device from Qt Creator, or otherwise the application of the active project.
level:levelHave the given level or a more severe one. Use verbose, debug, info, warning, error, or fatal. You can abbreviate the level, as in level:warn.

To leave out messages, add a minus sign in front of a term. For example, to see the warnings and errors of your application, except those with the tag Choreographer, enter:

 package:mine level:warning -tag:Choreographer

See also How to: Develop for Android, Developing for Android, Application Output, and Debug on Android devices.