Log Filtering

In this article: Log filtering is one of the most important feature in ULogViewer which helps you to find and analyze the problem from 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.

Text of Log

In order to filter logs by its text and allow covering all values of visible properties by single regular expression, values of visible properties of each log will be concatenated into single text with special separator characters. The order of concatenation of visible properties will be same as visible properties defined by 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 1st log will be:
2022/7/22 08:00:01$$123$$123$$ULogViewer$$Launching
The text of 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 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 button on toolbar or press Ctrl+P (⌘P on macOS).
  2. Click [Import…] or button in popup.

Applying

  1. Click 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.
Log will be listed if the text can be matched by one of selected predefined text filters or pattern in input field of text filtering. You can click [Clear selection] or button in popup to cancel applying predefined text filters.
⬆️ Back to top

Filtering by Other Conditions

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

Filtering by Level of Log

Listing logs with specified level only. The selection field shows at left hand side of input field of text filtering if Level property is available.

Filtering by Process ID

Listing logs with specified process ID (PID) only. The input field shows at left hand side of input field of text filtering if 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

Listing logs with specified thread ID (TID) only. The input field shows at left hand side of input field of text filtering if 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'.
⬆️ Back to top

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.

ULogViewer 3.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.

Before ULogViewer 3.0

The combination mode of text filtering and other conditions can be switched by clicking (AND)/(OR) button on toolbar.
⬆️ Back to top

Ignore Filtering Temporarily

There are 2 ways to ignore filtering result 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.
⬆️ Back to top