Title

Message

Confirm

<< DiscussionsReply

Regex for highlighting rows that do not start with a date stamp

Avatar from Gravatar.com
John-Alex Berglund
10 discussion posts
I've tried to create rule for highlighting rows that do not start with a date stamp (e.g "2013-07-05").
I've created a regex that works in RegexBuddy and seems to work in the Edit Highlight dialogue in the Highlight Testing textbox:
But when applied on the log, this does not work:

(?m)^(?!(\s*\d{4}-\d{2}-\d{2}.*$)).*$

Any idea why?
Jul 5, 2013  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've tested that RegEx string here, and it seems to work. After you added it in the highlight settings, did you then enable it on the log using the Highlight drop-down on the toolbar?
Jul 5, 2013  • #2
Avatar from Gravatar.com
John-Alex Berglund
10 discussion posts
I applied it on the log using the highlight dropdown, and removed all other highlighting for that log.
But, then all rows, also the ones starting with a date, was highlighted.

I have, however, found a workaround:
By adding a highlighting for all as the last rule and then another rule just above it in the list, for rows starting with a date, resetting the hightlighting.
Then using these two rules together gives the wanted result.

Btw: I have a couple of feature suggestions:
1. An option on Highlighting rules to Invert Match (i.e. Not highlighting matches, but all rows not matched)
2. An description field for the rule (for comments, or to replace the actual rule in the dropdown - especially useful for regex rules)
Jul 5, 2013  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, I've found the bug. It looks like LogFusion is matching the highlight rule to the whole line, including the line number at the beginning (which isn't actually in the log file). I'll add this to our list to fix up, and I'll also add your feature requests

Thanks!
Jul 5, 2013  • #4
Avatar from Gravatar.com
John-Alex Berglund
10 discussion posts
Nice. Thanks!
Jul 5, 2013  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We've just released a new version of LogFusion, and this should be all fixed up now

You can download it here: http://www.logfusion.com/Download

Thanks!
Jan 7, 2014  • #6
Was this helpful?    
<< DiscussionsReply