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 |
| ... | ||||
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
- Click
(
before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS). - Click [Create…] or
button in popup. - Set the pattern and name of text filter. The pattern will be set to pattern of input field of text filter by default.
Importing
- Click
(
before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS). - Click [Import…] or
(
before 2026.0) button in popup.
Applying
- Click
(
before 2026.0) button on toolbar or press Ctrl+P (⌘P on macOS). - 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.