cdcsgit / lognote

Log viewer, Android logcat viewer for Windows, Linux, Mac
https://cdcsutils.blogspot.com/search/label/Lognote
Apache License 2.0
164 stars 20 forks source link

Filter by tag: Inconsistency of $ #8

Closed IgorEisberg closed 4 months ago

IgorEisberg commented 10 months ago

Hi, thanks for the excellent log viewer. This is a minor issue, but something annoying nonetheless. When filtering by tag using a regex pattern, ^ always matches the beginning of the tag, but $ doesn't always match the end of it. Example:

12-05 22:22:48.538   728  1160 I zygote  : Verified 41637 classes from mainline modules in 4.623s

Filtering by ^zygote$ correctly finds this line. However:

12-05 22:23:37.314  1436  1753 D PackageManager: writeLegacyPermissionState for user 0 in 13 ms.

Filtering by ^PackageManager$ finds nothing. Filtering by ^PackageManager:$ finds the line, but the : is not really part of the tag, just like it's not part of the zygote tag (filtering by ^zygote:$ or ^zygote :$ finds nothing).

Hope you can patch it up. Thanks in any case.

cdcsgit commented 10 months ago

This occurs because the character following the tag is not a white space. Please use ".?" temporarily. ^zygote.?$ ^PackageManager.?$

I will improve it in the next version.

IgorEisberg commented 10 months ago

This occurs because the character following the tag is not a white space. Please use ".?" temporarily. ^zygote.?$ ^PackageManager.?$

I will improve it in the next version.

Understandable, considering that tags can contain : as well, makes it harder to identify a tag. Been using \b as a workaround for now, works but not failproof (cause tags can contain characters not within \w).

^(zygote|PackageManager)\b
cdcsgit commented 4 months ago

Applied to v 0.3.6