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 |
... |
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
- Click 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 button on toolbar or press Ctrl+P (⌘P on macOS).
- Click [Import…] or button in popup.
Applying
- Click 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.