lognote icon indicating copy to clipboard operation
lognote copied to clipboard

Filter by tag: Inconsistency of $

Open IgorEisberg opened this issue 2 years ago • 2 comments

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.

IgorEisberg avatar Dec 06 '23 22:12 IgorEisberg

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.

cdcsgit avatar Dec 07 '23 01:12 cdcsgit

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

IgorEisberg avatar Dec 07 '23 06:12 IgorEisberg

Applied to v 0.3.6

cdcsgit avatar Jun 18 '24 16:06 cdcsgit