Log Filtering

In this article: Log filtering is one of the most important features in ULogViewer that helps you find and analyze problems in logs.

Filtering by Text

This is the common and easiest way to filter logs. You can use Regular Expression to filter logs by matching text of log. Please refer to here for using Regular Expressions in ULogViewer.

Log Text

In order to filter logs by their text and allow all visible property values to be covered by a single regular expression, the visible property values of each log will be concatenated into a single text with special separator characters. The order of concatenation of visible properties will be the same as the visible properties defined by the log profile. Values of visible properties will be separated by special characters: $$.
For example, if logs are shown as:
Timestamp PID TID Source Message
2022/7/22 08:00:01 123 123 ULogViewer Launching
2022/7/22 08:00:02 123 234 ULogViewer The version of app is 2.0
...
Then the text of the 1st log will be:
2022/7/22 08:00:01$$123$$123$$ULogViewer$$Launching
The text of the 2nd log will be:
2022/7/22 08:00:02$$123$$234$$ULogViewer$$The version of app is 2.0
For the mentioned case, you can use pattern "2022/7/22" to filter logs with timestamp 2022/7/22. Or you can use pattern "(^|\$\$)ULogViewer(\$\$|$)" to filter logs with "ULogViewer" as one of visible properties.

Set Pattern of Text Filter

The input field for text filter is placed at center of toolbar. You can press Ctrl+F (⌘F on macOS) to move focus to the input field. You can navigate through history of text filter of current tab by pressing Up/Down when focusing on text filter input field.

Predefining Pattern of Text Filter

You can save pattern as predefined text filter to make log filtering easier.

Creating

  1. Click ( before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS).
  2. Click [Create…] or button in popup.
  3. Set the pattern and name of text filter. The pattern will be set to pattern of input field of text filter by default.

Importing

  1. Click ( before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS).
  2. Click [Import…] or ( before 2026.0) button in popup.

Applying

  1. Click ( before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS).
  2. Click to select predefined text filter to apply, or click with Ctrl (⌘ on macOS) or Shift (⇧ on macOS) pressed to select multiple predefined text filters to apply.
A log will be listed if its text can be matched by one of the selected predefined text filters or the pattern in the text filter input field. You can click [Clear selection] button in popup to cancel applying predefined text filters.

Filtering by Other Conditions

In addition to filtering by text, you can also filter logs by other conditions. Log will be listed if all these conditions are matched.

Filtering by Log Level

Lists logs with the specified level only. The selection field appears to the left of the text filter input field if the Level property is available.

Filtering by Process ID

Lists logs with the specified process ID (PID) only. The input field appears to the left of the text filter input field if the Process ID property is available. You can also set process ID by right-clicking on log and click 'Filter by selected PID' or 'Filter by selected PID only'.

Filtering by Thread ID

Lists logs with the specified thread ID (TID) only. The input field appears to the left of the text filter input field if the Thread ID property is available. You can also set thread ID by right-clicking on log and click 'Filter by selected TID' or 'Filter by selected TID only'.

Combination of Filtering Conditions

ULogViewer 4.0+

The combination mode of text filtering and other conditions can be changed by clicking (Auto)/(AND)/(OR) button on toolbar. If you select Auto then ULogViewer will choose AND/OR automatically according to content of text filter and other conditions.

Ignore Filtering Temporarily

There are 2 ways to ignore filtering results temporarily without clearing filtering parameters.

Show Marked Logs Temporarily

Click button at right hand side of toolbar, or press Alt+M (⌥M on macOS) to switch.

Show All Logs Temporarily

Click button at right hand side of toolbar, or press Alt+A (⌥A on macOS) to switch.