Android Log View

Showing and Hiding the Log View

The Android Log View window is named Android Log and is showed by clicking the TegraWindowsAndroid Log (logcat) menu item.

Working with the Log View

General Usage Info

The figure below shows the Log Window view, in the state that occurs when the filters panel has been closed.

For reference, the controls numbered above include: 

  1. Clear the search text box (item #2).
  2. Search text box (see Searching).
  3. Desired level of the message importance (see Filtering).
  4. Save the selected log lines to file.
  5. Clear the log window (device log is preserved).
  6. Clear the log on the device.
  7. Open or close the filters panel. A “pressed” button state indicates that the filters panel is open.
  8. Scroll locking. A “pressed” button state indicates that when new log lines are supplied from the device, the list view will auto-scroll to the bottommost line.
  9. Filter log by PID of the debugged app. This button is visible only during the debug session.

When resizing the window horizontally, the width of the search text box changes accordingly. If the window width is not enough to contain all of the toolbar controls, the search text box can be collapsed, and the toolbar controls on the far right can be hidden.

Below the toolbar is the main log list view area. The List View is capable of selecting multiple lines using standard Shift + click and Ctrl + click actions.

Shift + click will select all the lines from the first selected line to the clicked one. Ctrl + click will toggle the selected state of the clicked line.

Some of the log lines from the Android logcat command may not be recognized by the Log View. These lines are marked by the Unrecognized level, and have dummy values in each field, with the exception of Text, which contains the full log message text.

Each log line has a color that is calculated from the log message's level. The colors are:

The List View has a context menu with the following menu items:

Double-clicking the List View column’s right border will auto-resize that column to the size of the longest currently visible value in that column.

Searching

Searching is available via the search text box, and has the following capabilities:

Notes on searching:

  • Default search mode is search by text, therefore it is unnecessary to specify the text: prefix in order to search by text. For example, text:<search text> is equal to <search text>.
  • C# regexes can be used when searching by text or by tag.
  • Search by pid will match only the exact pid, i.e. pid:10 will not match pid 1083. Searching by text or tag will match the full string by its part, because of the default regexes behavior (see previous note)
  • If all of the letters in the search string are lower case, then the search will be case-insensitive. If even one letter is upper case, then the search will be case-sensitive.
    This is true even if the letter is escaped, e.g. letter in the regex character class \W.
  • Searching with the empty <search text> will result in all the log lines, i.e. it will not search for anything. To clarify this, the following search text box values will result in all log lines that are available: “”, “pid:”, “tag:”, “text:”.

Filtering

Android Log View can be filtered using two different features.

  1. Global filtering by Message Importance Level.
  2. Persistent filters functionality.

The Message Importance Level drop-down box has the following values:

Selecting any of these levels will show only the log lines which has a level that is equal or more severe (important) than the selected level. For example, selecting Info will filter out all the Verbose and Debug log messages. In this mechanism, any unrecognized log lines are treated as Verbose.

The persistent filters panel can be opened by pressing the Show Filters Panel button. The default Android Log window view with the filters panel open is displayed below.

The vertical bar between the filters panel and the main area can be adjusted to resize the filters panel.

Pressing the + button will open an Add Filter dialog, as shown below.

The Name field will be shown in the filters window. The Name field is not unique and can be empty. Filter by Tag, Filter by Text, and Filter by PID behaves the same as the Searching by tag, text, and pid behaviors. The Filter by Log Level behavior is the same as the Message Importance Level filter.

Filter fields are combined using logical AND. For example, Filter by PID = 4129 and Filter by Tag = System.err will show only the log lines whose pid is 4129 and tag is System.err.

The filters panel with two added filters is displayed below.

Each filter has a number in parentheses associated to it, which indicates how many log lines satisfy the filter’s conditions. That number changes dynamically as log lines are added or removed. Turning the filter on and off can be done via clicking anywhere inside the filter’s listbox item (except for the rightmost two-button area). Enabled filters are designated by marked checkboxes. If the filter name is too long to fit into the listbox, then it is trimmed and ellipsis () is added to the name.

It is possible to use multiple persistent filters, by checking several listbox items at once. The filtered result is calculated as filtered log lines of each filter combined by logical OR. Note that the combined log lines' count is not necessarily equal to the sum of the filters’ reported filtered log lines count. This is because one log line may satisfy different filters and therefore is included in several filters’ results at once.

When the mouse cursor hovers over the listbox item, two buttons are shown. These buttons can be used for either deleting or editing the filter.

Log View Persistence

Several aspects of the view are preserved between the Visual Studio runs, such as:

However, the search box text is not persisted.

Note: To reset the view to the default state (except for the window state), remove the %LocalAppData%\NVIDIA Corporation\Nsight Tegra\Settings\logcat_view.xml file.

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.200601 ©2014-2020. NVIDIA Corporation. All Rights Reserved.